HA
haneefm
Syncfusion Team
June 4, 2007 05:18 PM UTC
Hi Vivek,
You can hanlde the PrepareViewStyleInfo event to format the selected cells in a grid. Here is a code snippet that show this task:
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
GridControl grid = sender as GridControl;
if( grid.Model.Selections.Ranges.AnyRangeIntersects(GridRangeInfo.Cell(e.RowIndex,e.ColIndex))
|| ( grid.CurrentCell.RowIndex == e.RowIndex && grid.CurrentCell.ColIndex == e.ColIndex ) )
e.Style.TextColor = Color.YellowGreen;
}
Best regards,
Haneef