Asp updating database from dropdown box
Next, we'll see how to create an editable Grid View from an Object Data Source.As you may have guessed, when creating an editable Grid View whose data comes from an Object Data Source, the underlying data access layer class must provide an appropriate Update method.By default, the Text Boxes have no validation controls associated with them, but your business rules might require certain validation.A particular field may be required or might need to be entered in a specific format.But i still have an problem that, how i can get the number of selected row in gridview .....I tried using Index property but it give me negative index .......... , Id was generated using select comman of gridview ,,but dropdown list is added using templatefield.........therefor i have to update rec of dropdown and txtbox after clicking edit button.. But i still have an problem that, how i can get the number of selected row in gridview .....I m using ur previos code in my row command event...below.
All of the necessary functionality is encapsulated within the Grid View.
i have taken button which will save this 3 filds in database using store proc....
but the problem is i have to first select item from dropdown list box then i have to click select button then i have to click on save button .
(Recall that this dialog box is accessed through the second step of the Sql Data Source wizard, by clicking the Advanced button.) As with the delete example, checking the Generate Insert, Update, and Delete Statements will create not only an UPDATE statement, but INSERT and DELETE statements as well.
These can be safely removed if you are creating a Grid View that's limited to just editing the existing data.
Search for asp updating database from dropdown box:
The Grid View allows editing on a row-by-row basis.