I am actually talking about e.Item.DataItem for a footerdataitem type.
I am getting e.Item.DataItem = Nothing. but I can see there is a value if tries to access the cells(0).text ('0' is just an example.). I needed to access that value with out any formatting applied.
0
Accepted
Eyup
Telerik team
answered on 28 Mar 2012, 02:44 PM
Hi Sulman,
Generally, the footer in a grid is not defined as a DataItem, but as a FooterItem and this is the cause of the issue you are facing.
Indeed you can access the footer values as a DataItem using the code snippet below:
Protected Sub RadGrid1_ItemDataBound1(sender As Object, e As GridItemEventArgs)Handles RadGrid1.ItemDataBound
If TypeOf e.Item Is GridFooterItem Then
Dim footer As GridFooterItem = DirectCast(e.Item, GridFooterItem)
Dim text As String = footer("ColumnUniqueName").Text
End If
End Sub
For additional information on accessing cells and rows please refer to this article.
For further assistance, please inform us why you want to represent the FooterItem as a DataItem and what you want to achieve, so we can recommend you the most suitable approach.
Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.