Updating database using gridview

To accomplish this we need to specify values for the Sql Data Source control s statement created in Step 2.

For now, let s use the Properties window in the Designer, although the Configure Data Source wizard or declarative syntax option would work just as well.

Our goal is to extend this example to allow for the user to delete products via the Grid View.

Figure 2: Select the Delete Query Property from the Properties Window provide a value for this parameter (leave its Parameter source at None ).

Once we add deleting support to the Grid View, the Grid View will automatically supply this parameter value, using the value of its property added, the Grid View s smart tag now contains the Enable Deleting option. As discussed in An Overview of Inserting, Updating, and Deleting, this causes the Grid View to add a Command Field with its .

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.

Search for updating database using gridview:

updating database using gridview-72updating database using gridview-58updating database using gridview-18

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating database using gridview”