W
Weston Weems
I've got a collection of objects say fruit. and fruit has a fairly decent
heirachial structure not just flat props.
I've got my repeater to bind to my fruit collection just fine, but what I
want to do is actually be able to view specific properties in my repeaters
template.
Here's what I've got so far, which is being exectued for each row in the
repeater.
My problem is that for whatever reason I cant cast DataItem to Fruit. Can
anyone recommend an object of fruit type from my repeater?
protected string getFruitInfo(object DataItem,string propname){
Fruit currentfruit = (Fruit)DataItem;
switch(propname){
case "genus":
return currentfruit.this.that.genus;
}
}
heirachial structure not just flat props.
I've got my repeater to bind to my fruit collection just fine, but what I
want to do is actually be able to view specific properties in my repeaters
template.
Here's what I've got so far, which is being exectued for each row in the
repeater.
My problem is that for whatever reason I cant cast DataItem to Fruit. Can
anyone recommend an object of fruit type from my repeater?
protected string getFruitInfo(object DataItem,string propname){
Fruit currentfruit = (Fruit)DataItem;
switch(propname){
case "genus":
return currentfruit.this.that.genus;
}
}