Inserting updating and deleting data with the sqldatasource
Once it is bound to a Data Source control that supports Insert, Update, and Delete operations, Rad Grid can take an advantage of the data source capabilities to perform the required operations with no code except error handling required.In order to achieve this, you need to set the following three properties: The automatic data source operations only work when binding the grid to a declarative data source using the Data Source ID property of the grid.For the source code please check the "aspnet_clientside_confirmation.aspx" sample from the Grid folder in the Suite.I created a new table in Visual Web Developer for SQL Server Express 2005.In Part 24, we discussed about achievieng the same, using Object Data Source control.
We write Insert, Delete, update command in SQLData Source and pass parameter.
NET 2.0 introduced a number of new Web controls designed for accessing and modifying data. NET 2.0's data source controls make it possible to retrieve, insert, update, and delete data without having to write the tedious dedata access code that was so commonplace in ASP. Previous installments of this article series have looked at returning, inserting, and deleting data using the Sql Data Source control. These controls can work in unison with the data source controls to facilitate inserting, updating, and deleting data.
These controls allow page developers to declaratively access and modify data without writing any code to perform the data access. In this article we will examine basics of using the Sql Data Source and Grid View controls to update records from a database.
You must configure the data source so that it supports the automatic operations.
You also need to set the Data Key Names property of the table views in the grid so that the insert, update, and delete operations perform as expected.