I am using a background thread to add rows to the grid. I change the cursor of the form to Waitcursor when the process starts , And return to Default at the end. This applies to forms, but not to grids. When the cursor of the form changes back to the default value, the cursor of the grid does not change, even though the cursor is on the rest of the form .
Does this have anything to do with the fact that I update the grid from a background thread? (The cursor is changing directly from the UI thread).
Edit: The background process raises an event, and the handler checks the InvokeRequired property of the grid and decides whether to “call” the method again from the main thread. Actually , The actual UI update happens from the appropriate thread. I’m not sure if this means I’m “using a background thread”. 😐
I did it after I went
this.UseWaitCursor = false;
I added
DatagridviewFoo .Cursor = this.Cursor;
Maybe this is the same problem for you
I have a DataGridView in my Windows Forms application Control.
I am using a background thread to add rows to the grid. I change the cursor of the form to Waitcursor when the process starts, and return to Default at the end. This works for the form, but not for the grid. When the window When the cursor of the body changes back to the default value, the cursor of the grid does not change, even though the cursor is on the rest of the form.
This is the same as when I update the grid from a background thread. Does the fact matter? (The cursor is changing directly from the UI thread).
Edit: The background process raises an event, and the handler checks the InvokeRequired property of the grid and decides whether to “call” the method again from the main thread. Actually , The actual UI update happens from the appropriate thread. I’m not sure if this means I’m “using a background thread”. 😐
I encountered some problems when using datagrids for single-threaded updates. After I set waitcursor to true, the datagrid did not reset to a normal cursor.
What did I do after I went
this.UseWaitCursor = false;
I added
DatagridviewFoo.Cursor = this.Cursor;
< p>Maybe this is the same problem for you
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3384 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC