Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Update without using Edit and Update button

Reply
Thread Tools

Update without using Edit and Update button

 
 
Henke
Guest
Posts: n/a
 
      05-30-2006
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


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      06-01-2006
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.

-Brock
http://staff.develop.com/ballen


> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column button to edit a record without going thru postback? Randall Parker ASP .Net 1 10-31-2005 07:54 AM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 24 05-10-2005 10:15 PM
Snapshot restraint - edit, edit, edit Patrick Digital Photography 0 05-06-2005 10:53 PM
Would like to load a datagrid already in edit mode instead of having the user click the edit button Frank Kurka ASP .Net Datagrid Control 8 04-29-2005 09:33 AM
Datalist: update a datasource without using select/edit/update Hartmut Schroth ASP .Net 3 12-01-2003 09:54 AM



Advertisments