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

Issues with Cursor property of Grid

I am hosting a grid on a windows form. I want to see the cursor as wait cursor in certain conditions. I tried the following code - this.Cursor = Cursors.WaitCursor; this.gridTools.Cursor = Cursors.WaitCursor; The cursor is an hour glass everywhere expect on the grid. I again tried the following code - this.TopLevelControl.Cursor = Cursors.WaitCursor; this.gridTools.TopLevelControl.Cursor = Cursors.WaitCursor; Same result - The cursor is an hour glass everywhere expect on the grid. Please help me. Code snippet will be helpful. Is there a workaround? Thanks in advance Kapil Sinha

6 Replies

AD Administrator Syncfusion Team April 26, 2006 10:04 AM UTC

I found the fix in some old posts. Thanks >I am hosting a grid on a windows form. I want to see the cursor as wait cursor in certain conditions. >I tried the following code - > >this.Cursor = Cursors.WaitCursor; >this.gridTools.Cursor = Cursors.WaitCursor; > >The cursor is an hour glass everywhere expect on the grid. > >I again tried the following code - > >this.TopLevelControl.Cursor = Cursors.WaitCursor; >this.gridTools.TopLevelControl.Cursor = Cursors.WaitCursor; > >Same result - The cursor is an hour glass everywhere expect on the grid. > >Please help me. Code snippet will be helpful. Is there a workaround? > >Thanks in advance >Kapil Sinha


AD Administrator Syncfusion Team April 26, 2006 10:05 AM UTC

Hi Kapil, The mouse cursor for the grid can be changed in three ways. They are explained with an example in the below KB article. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=69 Let us know if you need any further assistance. Regards, Calvin.


AD Administrator Syncfusion Team April 27, 2006 03:33 AM UTC

Hi Calvin I implmented the first method using the CellCursor event available at the grid. However this only shows up the WaitCursor on the cells available in the grid. Is there a way to see the WaitCursor even in the blankspace of the grid? Thanks


AD Administrator Syncfusion Team April 27, 2006 04:48 AM UTC

Hi Kapil, By handling the CellCursor event only the cell’s cursor can be changed. To have the cursor all over the grid you can opt for the second or the third option. Regards, Calvin.


AD Administrator Syncfusion Team April 27, 2006 07:54 AM UTC

I used the second method and I was able to achieve what I wanted. Wait cursor both over the cell and the empty space inside the grid control. But looks like thats not enough for my client. Thats the way requirements pop up - Now I need to have wait cursor over the entire grid expect over a few cells. 1. The first method (MouseEnter) will enable me to have a wait or a normal cursor for a few cells but will leave the blank area with the normal cursor. 2. Second method (OnSetCursor) gives me no control. it will leave the wait cursor over the entire grid. 3. Third Method (IMouseController) - I am not so sure. I havent yet tried it but it gives me the mouse position based on which may be able to figure out the cell''s row and column indices and may try to do something. Anyway I need to implement all the methods of the IMouseController interface and I am not sure about how to do it. Do let me know if you have any idea about how implement this. Thanks


AD Administrator Syncfusion Team April 27, 2006 09:40 AM UTC

Hi Kapil, Please refer to the attached sample that displays the default cursor only over the first row and the first column cells and the wait cursor over the rest of the grid. When having our own custom MouseController by implementing the IMouseController interface, all the mouse events will be handled by the custom mouse controller and would not allow other mouse controllers to come in. Let us know if you need any further assistance. Regards, Calvin.

43556.zip

Loader.
Live Chat Icon For mobile
Up arrow icon