Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have one gridview. if i click the one row means,that row change the white color. At this time i leave it the gridview means change the default color. But,i need i click every row ,that row back color change to white and i click the outside of gridview it change to defautlt row style color.it is possible.....i used the following code
C#
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(GridView2, "Select$" + e.Row.DataItemIndex, true);

e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='lightyellow';"); //for onmouseover of the row 
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#ECE9D8';");
Posted
Updated 2-Mar-13 2:59am
v2
Comments
Karthik Harve 2-Mar-13 9:00am    
[Edit] pre tag added.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900