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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -