views:

183

answers:

1

I'm using the WPF Toolkit's DataGrid to display a set of search results. As per then scenario in my other question I want to be able to pre-fetch secondary results for each of my viewable (that is, within the visible scroll area) rows in the datagrid.

I want to be able to:

  • Query "viewable" rows
  • Raise an event when rows become visible (via vertical scrolling)

NOTE: Possible duplicate? [But without validated answer/outcome] - Anyone have any links/code samples to achieve this?

A: 

I have looked at this previously and have not found a solution.

You are talking about data virtualization, while i havent found a way to do it with the wpf datagrid it is readily available with the xceed grid pro version(built in), here is another solution that you could build on, using their implementation you could build a model that knows which rows have been loaded/requested and work from there.

Aran Mulholland
@Aran - The idea definitely showed potential, whereby I used the AsyncVirtualizingCollection with my own IItemsProvider that simply wrapped the full collection that was already loaded. However, when the DataGrid made use of it an exception from deep in the depths of the grid implementation because the data item is null at the start...
Reddog
It seems like it'll work wonderfully with the ListView though...
Reddog
For other's sake here (http://bea.stollnitz.com/blog/?p=378) is an extension of the solution linked above!
Reddog