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.

saving changes in DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

3764 Apr 7,2003 04:29 AM Apr 7,2003 09:27 AM Windows Forms 1
loading
Tags: GridControl
Peter
Asked On April 7, 2003 04:29 AM

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?

Administrator [Syncfusion]
Replied On April 7, 2003 09:27 AM

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.

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.

;