datagrid find item index?

J

janetb

I've got a datagrid index selection working from within the datagrid on the
onItemCommand with:
Dim itemTitle As TableCell = e.Item.Cells(1)
lblPgTitle.text=convert.toString(itemTitle.text)

But, if you need to select an item cell by clicking a button outside of the
datagrid and passing in the item(row) (vs selecting from within the
datagrid), how do you do it? Can you go to it via find or search without
iterating through the items? Tried various stuff - nothing working.

sub pgLast(sender as object, e as eventArgs)
Dim item As DataGridItem
For Each item In dgNavList.Items
if item = lblLast.text then lblPgTitle.Text = item.Cells(1).Text
Next item
end sub

thanks,
jb
 

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,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top