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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

11067 Feb 23,2004 03:51 AM Feb 23,2004 05:32 AM Windows Forms 1
loading
Tags: GridControl
Dominik Hurnaus
Asked On February 23, 2004 03:51 AM

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?

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;