Commandargument row updating

Next let us add code for detail view popup that displays selected gridview row in a detailsview control.Introduction The Grid View control displays the values of a data source in a table.

commandargument row updating-46

Then let us add an Update Panel with Gridview and add asynchronouspostback trigger for Grid View Row Command Event.

We are not going to use the default crud functionality that Grid View provides but going to achieve the same using Grid View Row Command Event just like how we displayed details in my previous article.

For a given supplier, the Form View will show information about the supplier along with a Button Web control that, if clicked, will mark all of their associated products as discontinued.

Additionally, a Grid View lists those products provided by the selected supplier, with each row containing Increase Price and Discount Price Buttons that, if clicked, raise or reduce the product s by 10% (see Figure 1).

While this Grid View will allow for a product s price to be adjusted, it won t be using the built-in editing or deleting features from the Grid View.

Therefore, we can set the drop-down list to (None) for the Object Data Source s UPDATE, INSERT, and DELETE tabs.

I am going to break down the code into several parts for easy understanding.

First of all add a Script Manager control to your webform as we are going to do everything in AJAX way.

In the above code, there are three button fields for performing operations such as detail, edit and delete.

Tags: , ,