I'm in the process of converting a VB.NET Class Library to C#. So far so good, except for the RadGrid events on the custom grid. In VB, I simply had the following:
Private Sub Me_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles Me.ItemDataBound
' Do stuff here
End If
in C#:
protected void Me_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
// Do stuff here
}
In the C# version, the events never get fired. What am I missing?
Thanks,
Adam
Update:
Just had to hook-up the events in the constructor... for anyone else who has this question...
public Grid()
{
this.ItemDataBound += MeItemDataBound;
}
Private Sub Me_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles Me.ItemDataBound
' Do stuff here
End If
in C#:
protected void Me_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
// Do stuff here
}
In the C# version, the events never get fired. What am I missing?
Thanks,
Adam
Update:
Just had to hook-up the events in the constructor... for anyone else who has this question...
public Grid()
{
this.ItemDataBound += MeItemDataBound;
}