When I hit the built in "Add new record" button in the header it works perfectly. But there is a + (plus) icon on the left of "Add new record" -- when I hit that it behaves differently. I want the plus icon to behave the same the Add new record.
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridCommandItem)
{
GridCommandItem cmditm = (GridCommandItem)e.Item;
LinkButton btn = (LinkButton)cmditm.FindControl("InitInsertButton");
btn.Attributes.Add("OnClick", "return ShowInsertForm('Roles');");
}
}
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridCommandItem)
{
GridCommandItem cmditm = (GridCommandItem)e.Item;
LinkButton btn = (LinkButton)cmditm.FindControl("InitInsertButton");
btn.Attributes.Add("OnClick", "return ShowInsertForm('Roles');");
}
}