ADAdministrator Syncfusion Team August 3, 2004 04:46 PM
In general, the easiest way to change a grid cursor is to derive the grid and override OnSetCursor. In the override, explicitly set the Cursor.Current static varaible to the special cursor where ever you want it. For example, below is code that sets a cross cursor over cell 2,2.
public class MyGridControl : GridControl
protected override void OnSetCursor(ref Message m)
Point pt = this.PointToClient(Control.MousePosition);
int row, col;
if(this.PointToRowCol(pt, out row, out col, -1)
&& row == 2 && col == 2)
Cursor.Current = Cursors.Cross;
You can also do the by deriving GridDragSelectMouseController and overriding Cursor to provide the cursor that way. It would take a little more work than just deriving the grid.