Update without using Edit and Update button

H

Henke

I use a GridView on a page to display data that I'd like to update.
Is it possible to update the data in the db without using the Edit and
Update buttons.
I'd like to have one button on the page that I can press when all data is
updated. To be able to change the data in a cell I remove the Label in the
ItemTemplate and replaces it with a TextBox.
Thanks in advance!
/Henke
 
B

Brock Allen

The GridView lends itself to only editing one row at a time. But there is
an UpdateRow API on the GridView to manually update a specific row. You'd
have to have a button on your form call this for each row index you'd like
to be updated. I've not tried this approach myself, so not sure if there
are any internal checks that would prohibit this since the rows won't be
in edit mode. Also, keep in mind that given that the GridView is only designed
to edit one row at a time you're going to make N round trips to the data
base for N number of rows you want to update.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top