datagrid coloring

georgepatotk

Contributor
Joined
Mar 1, 2004
Messages
432
Location
Malaysia
Code:
<asp:datagrid	id=MyDataGrid 
				Width="768px" 
				Font-Name="Verdana" 
				Font-Size=8 
				CellPadding=3 
				CellSpacing=0 
				HeaderStyle-BackColor="#aaaadd"
				OnCancelCommand="MyDataGrid_Cancel" 
				OnUpdateCommand="MyDataGrid_Update" 
				OnEditCommand="MyDataGrid_Edit" 
				AutoGenerateColumns="False" 
				runat="server">
</ASP:datagrid>

the code above works perfect, the only problem is I dont' know how to make the rows' color.

Odd row: white color
Even row: gray color

Where should I slot the code for coloring the datagrid as mention odd row and even is displayed with different color. Thanks
 
wao... I figured it out..
Simple enough:
add these two lines will do..

Code:
AlternatingItemStyle-backcolor="palegreen"
ItemStyle-backcolor="beige"
 
Back
Top