Let's take a ASP.NET Grid View Control and placed it on ASP.NET Page with ID "gdRows". See below.
1 | <asp:GridView ID= "gdRows" runat= "server" > |
2 | </asp:GridView> |
1 | $(document).ready( function () { |
2 | $( "#<%=gdRows.ClientID%> tr" ).filter( ":odd" ).css( "background-color" , "grey" ); |
3 | }); |
1 | $(document).ready( function () { |
2 | $( "#<%=gdRows.ClientID%> tr" ).filter( ":even" ).css( "background-color" , "blue" ); |
3 | }); |
source : http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html
No comments:
Post a Comment