I am using the following to locate an Item in the grid and select it;
However I would prefer to use something like;
I have tried the above using "gvArea.Items", "gvArea.ItemsSource" and "gvArea.DataContext" with no luck.
Thanks in advance...
For
Each
item
As
AreaView
In
gvArea.Items
If
(item.AreaId = iAreaId)
Then
gvArea.SelectedItem = item
gvArea.ScrollIntoView(item)
Exit
For
End
If
Next
However I would prefer to use something like;
Dim
item
As
AreaView = gvArea.Items.Where(
Function
(f) f.AreaId = iAreaId)
gvArea.SelectedItem = item
gvArea.ScrollIntoView(item)
I have tried the above using "gvArea.Items", "gvArea.ItemsSource" and "gvArea.DataContext" with no luck.
Thanks in advance...