I am trying to change the image for an imagebutton on mouseover.
i followed this posting:
http://www.telerik.com/community/forums/aspnet-ajax/grid/reference-control-in-nestedviewtemplate.aspx
I was able to add the attributes in the ItemDataBound event with the code below:
i followed this posting:
http://www.telerik.com/community/forums/aspnet-ajax/grid/reference-control-in-nestedviewtemplate.aspx
I was able to add the attributes in the ItemDataBound event with the code below:
protected
void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
foreach (GridNestedViewItem item1 in RadGrid1.MasterTableView.GetItems(Telerik.Web.UI.GridItemType.NestedView))
{
ImageButton imgbtn = (ImageButton)item1.FindControl("ImageButton1");
imgbtn.Attributes.Add(
"onmouseover", "src='App_Themes/MLightning/Layout/Key_Select2.bmp'");
imgbtn.Attributes.Add(
"onmouseout", "src='App_Themes/MLightning/Layout/Key_Select1.bmp'");}
}
}
The image changes on mouseover and mouseout respectively.
However the screen tends to jump when i mouseover the button or mouseout.
I don't want the user to see the screen flicker ... please guide.