|
Code:
<code>
private void GridPrepareViewStyleInfo(object
sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
int row = -2, col =-2;
this.gridDataBoundGrid1.ViewLayout.PointToClientRowCol(this.gridDataBoundGrid1.PointToClient(Control.MousePosition),
out row, out col, true, GridCellSizeKind.ActualSize);
if(e.RowIndex > 0 && e.ColIndex > 0)
{
if(e.RowIndex == row)
{
e.Style.TextColor = Color.Orange;
}
else
{
e.Style.TextColor = Color.Black;
}
}
}
private void GridCellMouseHoverLeave(object
sender, Syncfusion.Windows.Forms.Grid.GridCellMouseEventArgs e)
{
this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Row(e.RowIndex),
GridRangeOptions.None);
}
private void GridCellMouseHoverEnter(object
sender, Syncfusion.Windows.Forms.Grid.GridCellMouseEventArgs e)
{
this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Row(e.RowIndex),
GridRangeOptions.None);
}
</code>
|