Hi, in your documentation it says : "With ASP.NET 2.0 DataSource Controls such as the SqlDataSourceControl, the WebGrid can provide automatic updating - no code required"This is beautifull, however if I modify my grid and I go to another page, my modifications are not saved. So how do I commit those changes automatically to the database?Thanks
Do you mean that an existing row that you've updated is being deleted from your database after you update it in the grid and post back? If so, that's certainly not right. The update command would be the one thing I can think to check, and you've already done that. I still suspect a setup problem, though I'm not currently certain what else to look for.
Can you reproduce this behavior in a sample application that we could run and debug, such as using the Northwind database as the source for your SqlDataSource? If so, please submit a support request so that a Developer Support Engineer can assist you in a more direct fashion.
Interesting, by doing so, when I modify a line and do a postback the line is deleted from the database. My update command is automatically generated when I created my sqldatasource so it does not come from my udpate command. Any idea?Thanks
You have to trigger a postback before you navigate to another page for the automatic update to occur.
Alternately, you can enable the grid's AJAX functionality. In this situation, updates will be processed via AJAX whenever the active row of the grid changes or the grid loses focus. Even here, though, the update condition (active row change or grid losing focus) must occur before you navigate, or changes will not be processed.