Hi everyone,
I found an issue with the RadGrid Component. If I add a GridCalculatedColumn to the RadGrid, I can't write the sample of code you could find below anymore. In fact, e.Item.DataItem belongs to type DynamicCalss1 (see in debugger) but I can't use it for accessing to the methods of the Item.
The only workaround I found is to not use this type of column, but it is really unconfortable to not use it.
I'm pretty sure there is another solution, so I will be very happy if you could help me.
I found an issue with the RadGrid Component. If I add a GridCalculatedColumn to the RadGrid, I can't write the sample of code you could find below anymore. In fact, e.Item.DataItem belongs to type DynamicCalss1 (see in debugger) but I can't use it for accessing to the methods of the Item.
| protected void gridViewCtrl_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| if (e.Item.ItemType == Telerik.Web.UI.GridItemType.Item || |
| e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem) |
| { |
| ProductDataContract prod = e.Item.DataItem as ProductDataContract; |
| prod.DoSomething(); |
| } |
| } |
The only workaround I found is to not use this type of column, but it is really unconfortable to not use it.
I'm pretty sure there is another solution, so I will be very happy if you could help me.
Thanks.