iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a page which contains a WebGrid with BatchUpdate enabled. On this page there are other text fields which the user can change an upon these values changing, certain cells in the grid will have their values changed. If the user then export the grid, the grid will export with the initial values and not with the changes that the user prompted.
I have uploaded a sample to illustrate. If you enter a numeric value in the Qunatity text field and then click anywhre on the page you will notice that the values in the grid change. If you then export the grid you will notice the original values get exportted, not the new values.
Can you please modify this sample to show how the changes made to the grid can be included in the export?
NOTE: I am using the 2009 R1 SP1 version of the controls.
That's because you don't handle your database update in your dataset so it would return into original data.
E.gPlease try to turn off BatchUpdate. In normal editing mode, try to change the value and do row update. The modify changes are entered into WebGrid. But if you do Refresh, the data is not persisted because there is no update function in your dataset.
On BatchUpdateMode.When you do AcceptPendingChanges, all data would be refreshed. That's why it got back into original value and the modify changes are gone.
Regards,Handy
Hi Mark,
I think it is because you haven't done Accept all the changes that user did. This is our default behaviour. You will need accept all the changes before do the export so the changes can be exported.
Thanks for the reply Handy. Can I accept all changes via the client side?
Yes, you can. We have AcceptAllChanges method.
It is simply like this :
var grid = ISGetObject("wgTillPort"); grid.AcceptAllChanges();
Regards,
Handy
Ok after updating all the rows in the grid I call grid.AcceptAllChanges() but this is causing all the changes in the grid to be lost and therefore the export is still exporting the orginal data.
After investigating further I found that calling grid.AcceptAllChanges() causes the InitializeDataSource event to fier again so my grid is being reloaded with the orginal data. I also noticed that when exporting the InitializeDataSource event alos fires so I am always going to get the original data as the changes I maje to the grid don't actually get saved to the server, they are for forecasting/prediction purposes only.
Is there anyway you can tell the grid to keep the changes that have been made without posting back to the server and then be able to export the data in the grid without the export causing the InitializeDataSource event to fire?
Thanks Handy. Turning BatchUpdate off, using row.Update() allows me to export the changed data correctly.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname