In .aspx File declare OnRowCreated eventas follow. <asp:GridView ID="GridView1" runat="server" OnRowCreated="OnRowCreated"> Following code will: Highlight Gridview which is not using alternate row color. protectedvoid OnRowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { //On Mouse Over Highlight Row e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffff00'"); //On Mouse out restore default row color e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } }
free tutorial for everyone .here anyone ask dotnet, asp.net, mvc, linq, entity framework question. discuss any problem related these topics. solution in 24 hours assure.preparation interview question in dotnet , asp.net .
Saturday, 16 June 2012
Code for How to Highlight Row of Gridview on Mouse Over which doesn't use alternate row color in Asp.net
Labels:
Ado.net
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment