I have a RadGrid in a web user control. In the grid I have a a link button. When the link button is clicked, I capture the ItemCommand event and then want to bubble the event up to the parent page. The problem I have is that the event will not bubble up because MyRowSelected is always null. I've tried a few variations of the code, but here is a snippet of the latest:
public partial class ObjectList : System.Web.UI.UserControl
{
public event EventHandler MyRowSelected;
protected
void rgList_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName == "Select")
{
OnMyRowSelected(e);
}
}
protected void OnMyRowSelected(GridCommandEventArgs e)
{
if (MyRowSelected != null)
{
MyRowSelected(
this, e);
}
}
}