Radgrid not updating after delete

Rated 4.97/5 based on 536 customer reviews

Upon completing the wizard, Visual Studio will add Bound Fields to the Details View for the " Delete Command= "DELETE FROM [Products] WHERE [Product ID] = @Product ID" Insert Command= "INSERT INTO [Products] ([Product Name], [Unit Price], [Discontinued]) VALUES (@Product Name, @Unit Price, @Discontinued)" Select Command= "SELECT [Product ID], [Product Name], [Unit Price], [Discontinued] FROM [Products]" Update Command= "UPDATE [Products] SET [Product Name] = @Product Name, [Unit Price] = @Unit Price, [Discontinued] = @Discontinued WHERE [Product ID] = @Product ID".

Visit the page in a browser and note the Edit, Delete, and New buttons included in the Details View.

From the Designer in Sql Data Source and then bring up the Properties window (from the View menu, choose Properties window, or simply hit F4).

Select the Delete Query property, which will bring up a set of ellipses.

When the Sql Data Source control s method is invoked either programmatically or automatically from a data Web control a connection to the database is established, the parameter values are assigned to the query, and the command is shuttled off to the database.

The results are then returned as either a Data Set or Data Reader, depending on the value of the control s value has been specified, the Enable Inserting, Enable Editing, or Enable Deleting option in the corresponding data Web control s smart tag will become available.

radgrid not updating after delete-39

radgrid not updating after delete-26

radgrid not updating after delete-23

radgrid not updating after delete-7

With the Sql Data Source, we need to provide SQL statements (or stored procedures) to execute.

If you need to brush up on implementing these features within the Grid View, Details View, and Form View, return to the Editing, Inserting, and Deleting Data tutorials, starting with An Overview of Inserting, Updating, and Deleting.

collection and can include hard-coded values, common parameter source values (querystring fields, session variables, Web control values, and so on), or can be programmatically assigned.

In previous tutorials we learned how the Object Data Source control allowed for inserting, updating, and deleting of data.

The Sql Data Source control supports the same operations, but the approach is different, and this tutorial shows how to configure the Sql Data Source to insert, update, and delete data.

Leave a Reply