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
close icon

saving changes in DataBoundGrid

I'm saving changes the user made in the CurrentCellMoved event if the user made some changes to the primary key columns. Therefor I check if the last current cell is a primary key column and then call Binder.EndEdit and DataAdapter.Update. The update method takes some time (say about one second). In this time the grid isn't painted and stays white. Isn't there a chance to prevent this behaviour? For all other changes I call the Update method of the DataAdapter in the RowEnter Event and there I don't get this behaviour. What am I doing wrong?

1 Reply

AD Administrator Syncfusion Team April 7, 2003 01:27 PM UTC

If DataAdapter.Update is taking that long when you change primary keys, then I am not sure if there is much to be done without resorting to trying to do the update on a new thread, but of course that has its gotchas too. The reason there is no painting at this point is that the grid has had a BeginUpdate called, and will call EndUpdate after the cell move has been completed (as signified by returning from the OnCurrentCellMoved method). So, one thing you could try is to call grid.Model.EndUpdate (or CancelUpdate) before you do the dataadapter update. The RowEnter calls EndUpdate prior to the event.

Loader.
Live Chat Icon For mobile
Up arrow icon