janetb
05-08-2006, 10:02 PM
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
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