LS
Lingaraj S
Syncfusion Team
May 23, 2009 06:27 AM UTC
Hi Abhinav,
Thank you for your interest in Syncfusion product.
In GridGroupingControl the cell formatting done through the GridTableCellStyleInfo. If you need to format the cell, then please try using GridTableCellStyleInfo or Style property in QueryCellStyleInfo event to achieve this behaviour.
Please refer the code below:
// through GridStyleInfo
GridTableCellStyleInfo style=this.grid.TableModel[1, 2];
style.BackColor=Color.Red;
style.TextColor=Color.Yellow;
// through WueryCellInfo
this.gridControl1.QueryCellStyleInfo += new GridQueryCellInfoEventHandler(grid_QueryCellStyleInfo);
void grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.TableCellIdentity.RowIndex == 2 && e.TableCellIdentity.ColIndex == 5)
{
e.Style.BackColor=Color.Red;
e.Style.TextColor=Color.Yellow;
}
}
Let me know if it helps.
Regards,
Lingaraj S.