The code works fine at my end. Make sure your connection string is correct for proper operation. Make sure your command events fire and use breakpoint to find out if all the values are obtained in the Update/Insert/Delete command. If you have made any changes to the demo code, please let know.
sorry to bother you with this again. Here is my solution.
As already mentioned my main problem is that the changes made in the form do not get saved to the db. The changes or even new records are only visible in the current session. If I rerun the code all changes and new records inserted will disappear.
Another minor problem I have is that the edit form stays open even if I set this line to false: this.RadGrid1.MasterTableView.Items.Edit = false;
You will see in the solution I tried also other methods for insert/update which are commented out but I get even more problems with those.
Your support is really appreciated.
Basically, the edit/insert form not closing after an operation is a sign that there is an issue with the update/insert logic. I see that you are having Automatic CRUD operation, but along with which you have used OnUpdateCommand/OnInsertCommand events. These events are used only when performing Manual CRUD operations.
Either use only AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" for Automatic operation with your SqlDataSource, else you have to do manual updates setting the above properties to false and handling the events in OnUpdateCommand/OnInsertCommand events. Please try and let me know if any concern.
Shinu, thanks again for your continuous support.
I have reproduced the demo without any modification, rather then my connection string and a SqlDataSource necessary for the connection to the db. Here is the linked project.
The problem about the edit form not closing is solved.
But still the data are not written in the db. New records or modified once exist only in memory.
Could you please provide me the changes necessary to make this working (I mean to save changes and records to the db)?
Thanks a million,