Getting the value of a databound cell in a datagrid in a loop

  • Thread starter Thread starter OrlandoRocks
  • Start date Start date
O

OrlandoRocks

Ok, I am stumped.

I can get the value of a cell in the item command event with
e.item.cells(3).text

but what I need to do is loop through a datagrid rows and get the
values of a paticular column, hence I do not have the "e"

I am looping through with:

For Each dgitem In DataGrid1.Items

Any help would be GREATLY apprceiated.

Russ
 
Hi,

e.Item in the ItemCommand is reference to the DataGridItem as is dgItem in
the loop. Therefore that would be:

For Each dgitem In DataGrid1.Items
dgItem.Cells(3).Text...
Next
 

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

Back
Top