views:

352

answers:

1

Is it possible to scroll to a particular row (by object identity) in a Silverlight DataGrid that has an ItemsSource which is a PagedCollectionView.

I am loading a list of orders that are grouped by day/status etc. I need to be able to scroll to a particular order.

 var pcv = new PagedCollectionView(e.Result.Orders);
 gridOrders.ItemsSource = pcv;

Unfortunately, ScrollIntoView(order) doesn't work because of the PagedCollectionView.

An article on DataGrid from MSDN shows that it is possible to scroll to a group in a PagedCollectionView, but that's not really much use.

  foreach (CollectionViewGroup group in pcv.Groups)
  {
       dataGrid1.ScrollIntoView(group, null);
       dataGrid1.CollapseRowGroup(group, true);
  }

Is there a way to do this ?