<code>
void gridGroupingControl1_QueryCellStyleInfo(object sender,
Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
GridTableCellStyleInfo
style = e.Style as GridTableCellStyleInfo;
if (style.TableCellIdentity.TableCellType ==
GridTableCellType.AlternateRecordFieldCell
||
style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell)
{
int row, col;
Point pt = new Point(MousePosition.X, MousePosition.Y);
Point pt1 = this.gridGroupingControl1.TableControl.PointToClient(pt);
this.gridGroupingControl1.TableControl.PointToRowCol(pt1, out row, out col);
if (e.TableCellIdentity.ColIndex == col &&
e.TableCellIdentity.RowIndex == row)
{
e.Style.TextColor
= Color.LightBlue;
this.gridGroupingControl1.TableControl.RefreshRange(GridRangeInfo.Cell(row, col));
}
}
}
</code>
|