This is a migrated thread and some comments may be shown as answers.

Batch edit refreshing datasource before perform the update

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jnchaves
Top achievements
Rank 1
Jnchaves asked on 17 Jun 2015, 05:24 PM

Currently I am working with a RadGrid that is using batch update that is attached to a SqlDataSoure to load, update and delete. Everything is working fine but normally the users spend around 20 minutes to review and update everything they need before hit "Save Changes", during this process new records are inserted in the database so the data displayed on the screen is not the same of the database. When the user finally hit "Save Changes" the grid refresh first the dataset and after that perform the updates generating errors because records that were not displayed are updated.

 Is there a way to tell the grid to load the data only when it is not postback? Like doing it in the OnNeedDatasource in the code behind.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Jun 2015, 04:37 PM
Hi,

I suppose that the grid throw errors because the data was edited by someone else before the other user click Save Changes. This is not related to the grid itself, if you use ASP GridView you will encounter the same problem. However, to prevent this exceptions you can handle edit process manually. To complete this you can use OnBatchEditCommand event and conditionally update the datasource.

Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Jnchaves
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or