This is a migrated thread and some comments may be shown as answers.

RadGrid in a FormView

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 05 Jul 2011, 03:17 PM
Hi All,

I've got a RadGrid inside a formview.  In the DataBound event of the formview I need to add the ItemDataBound event handler for the RadGrid.  I can find the grid just fine using the formview.FindControl method but once done I cannot see the event in the list of properties and methods for a RadGrid.  I was thinking that the below should work:

Dim uxRadGrid As Telerik.Web.UI.RadGrid = DirectCast(uxFormView.FindControl("uxRadGrid"), RadGrid)
uxRadGrid.ItemDataBound += New GridItemEventHandler(uxRadGrid_ItemDataBound)

From c# examples it appears to work but in VB.Net you can't access the event view uxRadGrid.ItemDataBound.  How do I work around this?  You can't even access the event when trying this outside of a formview.  

Regards,

Jon

1 Answer, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 05 Jul 2011, 03:53 PM
hmmm I'm a dumbass today!

Forgetting that in VB.Net you use AddHandler!

AddHandler uxRadGrid.ItemDataBound, AddressOf uxRadGrid_ItemDataBound
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Share this question
or