alternating row color
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdatagridrepeaterdatalist' list.


renevazquez@cimex.com.cu
-- Moved from [aspngfreeforall] to [aspngdatagridrepeaterdatalist] by Yannick Smits <Click here to reveal e-mail address> --

Hi, anyone have an idea of how can I make that the rows of a table
binded to a dso, draw a cell in one color and the next in white to
differentiate two consecutive row.

thanks a lot in advance for any help!!

Reply to this message...
 
    
Alex Lowe
Using Andre's example with the DataGrid:

<asp:DataGrid
    Id="dgrdtitles"
    RunAt="server"
    CellSpacing="3"
    HeaderStyle-BackColor="DarkRed" <-- Here is your Header/Title
    ItemStyle-BackColor="Gainsboro" <-- Here is row 1 and every
second row
    AlternatingItemStyle-BackColor="Silver" <-- Here is row 2 and
every second row
    AutoGenerateColumns="false"
    OnCancelCommand="Grid_CancelEdit"
    OnEditCommand="Grid_edit"
    enableviewstate="false" />

Hth,

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Translate C# code to VB.NET code at
http://aspalliance.com/aldotnet/examples/translate.aspx
***********************************************************

[Original message clipped]

| = JOIN/QUIT

Reply to this message...
 
 
System.Web.UI.WebControls.DataGrid
System.Windows.Forms.DataGrid




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com