Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid and Edit/Update

Status
Not open for further replies.
Mar 14, 2002
711
US
I have a bit of a dilemma, I have a datagrid with 3 columns that are pre-existing with the data each time it is displayed, then I have about 8 columns I need to edit/update the data fields; depending on the selection this can be anywhere from 4 rows of data up to 15 rows. Is there a way to click edit on Row 1, and it will then activate the editable/updateable fields for all the rows in the datagrid, or will I have to have the user click EDIT for each row they want to update?

Thanks for any insight on this one,
 
I wonder if you could put textboxes in your item template instead of labels then all the reocrds would bind in somewhat of an edit mode. you would then have a button outside the grid for your update. BUT, once you click that button you would have to loop through the grid and update your DB.

just a thought.

 
I tried that before, the issue was updating the 3 columns with the data that I pull from the database, I was able to pull in Row 1 (Col 1, 2, and 3), but then stuck on how I could pull in Row 2, etc....
 
You would have to loop through all the datagriditems(rows)
something like:


Dim i As Integer
Dim dgi As DataGridItem
For Each dgi In DataGrid1.Items
.. do stuff ..
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top