RC
Rajadurai C
Syncfusion Team
January 27, 2009 02:33 PM UTC
Hi Nassim,
Thanks for your interest in Syncfusion products.
The styles which are achieved from the above code in gridgroupingcontrol, can be achived in griddataboundgrid with the following code by handling PrepareViewStyleInfo event.
void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.RowIndex == 0 && e.ColIndex > 0)
{
e.Style.TextColor = Color.White;
e.Style.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Desktop);
}
if (e.RowIndex > 0)
{
if(e.RowIndex %2==0)
e.Style.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(214)))), ((int)(((byte)(233))))));
}
}
Set ThemesEnabled property to true to get these styles applied to grid.
Regards,
Rajadurai