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 want to use WebGrid to allow a user to change some data and then process the changes upon a button click. The button is a WebButton on the same page as the grid, but not in the grid.
I can load the grid successfully with an ISDataSource from a SQL 2005 DB. I have put "e.ReturnValue = False" in the OnRowUpdate event handler. The problem is that when I access the grid cell values in the button click event, the values are the initially loaded values, not the new values typed in the grid by the user.
Can you please send me a code sample that shows me how to do this?
Thank you very much,
Darlene DeMaio
In your sample, i didn't see anything can get updated value or something so I modified my previous sample. I added WebButton "OK". On this button, I get the cache data. Please run my attached sample and try to change 'ContactName' column.
Regards,Handy
Hi Darlene,
You will need handle your changes when click on WebButton. Attached sample has the similar scenario. In fact, I am using dataset and when i clicked the button, I accept the changes and update it. Hope this helps.
(Note: the sample uses Northwind database>>Customer )
Thanks for the reply.
But, I still can't make my code work the way I want it to. I've attached my aspx and aspx.cs files.
I want to be able to change the originally loaded value of the Quantity grid cell in each row by typing in a new value and then get thosenewly typed values in the OnOKButton_Clicked server-side handler. I don't want to update the database or anything else in this method. I just want to get those newly typed quantity values and use them in some logic (not yet coded in the attached code).
Please let me know what changes I need to make to get this to work.
Thanks,
Darlene
WebGrid 7 includes built-support for this scenario, which is called batch update. Check out the feature here. I think the batch update feature will really save your time if you need a solid batch editing capability (multiple edits and then save in one request).
Also with the feature, you can easily get the changes in both client or server-side, for example, grid.GetChanges() will return a collection of all pending changes across tables.
Hope this helps,James.
Hi James,
We are using WebGrid 6.07200.211. We cannot upgrade to WebGrid 7 at this time. I need to know how to do this with the version of WebGrid we are currently working with. Can you tell me what code changes/additons I need to make in the code I sent you.
Remember I don't need to be able to "save" the changes on the button click, just get the new values of the Quantity cells into program variables. If the collection returned by grid.GetChanges() is the answer, please show me how to get those text values using it.
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