Access to Rows in a datagrid

  • Thread starter Thread starter Robin Bonin
  • Start date Start date
R

Robin Bonin

I am working on a page to allow editing of products in out database. I'd
like to bind a datareader to the table. And on submit generate an update
query for each row. My problem is that I can't find out how to iterate
through all the rows in the dataGrid

I don't want to use the built in edit mode available because there are going
to be allot of small changes and would be time consuming to hit edit for
each row.



I'm hoping that I can do something like this



For each row in datagrid

value1 = row.textBox1.value

value2 = row.textBox2.value

' sql work

Next
 
Sounds like you want the DataGridItem object.

For Each item as DataGridItem in gridMain.Items
' do stuff
Next

HTH,

--Jon
 
Back
Top