asp.net - C# WEb App Listview formatting -
building web app here , able alternate listeview rows. can give me sample code achieve this? 3 standard ones in vs2010 sucks , i'd able give goes along scheme of webapp. row 1= blue, 2=gray, 3=blue, etc. effect.
thanks
set colors in templates:
edited add imagine header built in layouttemplate, can bold them there (see code added). you'll want use css - define various styles need in separate css file classes, , assign classes needed save excess typing.
<asp:listview id="listview1" runat="server"> <layouttemplate> <table> <tr> <td style="font-weight:bold;">header</td> <td style="font-weight:bold;">header</td> </tr> <asp:placeholder id="itemplaceholder" runat="server" /> </table> </layouttemplate> <itemtemplate> <tr style="background-color:blue;"> <td></td> </tr> </itemtemplate> <alternatingitemtemplate> <tr style="background-color:gray;"> <td></td> </tr> </alternatingitemtemplate> </asp:listview>
i've abbreviated code considerably, should going want.
Comments
Post a Comment