We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridControl resets MouseCursor on this.Controls.Add(this.grid)

Hi folks! 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(); hd.Show(); ... The problem is, that within my custom form''s InitializeComponent-method a Syncfuision.GridControl is being added : ... this.Controls.Add(this.grid); ... 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?

1 Reply

AD Administrator Syncfusion Team February 23, 2004 10:32 AM UTC

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.

Loader.
Up arrow icon