Sqldatasource updating old values


14-Nov-2016 09:51

In this article, I am going to explain how to manipulate data using Grid View control.

This article scope is limited to Updating and Deleting records using Grid View and I am not using any readymade Data controls for that but manually writing all event methods.

After that again, I am doing the same thing that I had done in Cancel Record method, I mean setting Edit Index property of the Grid View to -1 and rebinding the data again by calling Bind Data() method.

When Delete link of the Grid View will be clicked, it will confirm the user whether they really want to Delete the record, if they will click OK, it will fire On Row Deleting event of the Grid View that will call Delete Record method.

You can notice that I have kept Required Field Validator too inside the Edit Item Template as I want the textbox to be validated for empty data.

In the same way you can put any kind of Validation controls inside Edit Item Template to validate the form element while user will click Update link.

sqldatasource updating old values-63

Istanbul xxx

sqldatasource updating old values-73

sex dating in odem texas

For the source code please check the "aspnet_clientside_confirmation.aspx" sample from the Grid folder in the Suite.

In this method, I am specifying the Edit Index property of the Grid View to -1.