I am loading a Form, which takes some seconds (connection to server and getting some data...). During this time i want to have the wait-Cursor.
My code is like this:
Cursor.Current = Cursors.WaitCursor;
ui_HeatDataOv hd = new ui_HeatDataOv();
The problem is, that within my custom form''s InitializeComponent-method a Syncfuision.GridControl is being added :
and that this call resets the MouseCursor to the "normal" MousePointer. This effect only appears when a GridControl is added to the the form (no problem with System.Windows.Forms Controls).
Does anyone have an idea how to solve the Problem?
ADAdministrator Syncfusion Team February 23, 2004 05:32 AM
The control with the input focus is the one that controls the cursor. Are you somehow setting input focus to the grid?
I tried to see this behavior in this sample
, and could not. Whether I used a Windows Forms DataGrid or a GridDataBoundGrid, I see the same behavior. While the mouse is over the parent form, the wait cursor is present.
Now it is true that if the GridDataBoundGrid has input focus while you are doing this work, it will control the cursor and will likely reset it. This is by design as the grid cursor changes dynamically as you move over different areas of the grid. To control this behavior, the simplest way is to derive the grid, and override OnSetCursor. Here is a sample. You can add additional checks to narrow where you set the cursor.