wpf binding and lazy loading

279 views
Skip to first unread message

Kevin Anderson

unread,
Nov 2, 2011, 5:43:39 PM11/2/11
to nhusers
I did do a quick search but honestly I am not even sure what to look
for. I am using a grid (XamDataGrid) with nhibernate and it seems that
the wpf binding to the grid is causing load all of the various pieces
of the object each row is displaying even if we have lazy loading on
and the column for that particular piece is not visible.

Has anybody seen this behavior? Is there a work around?

Thanks.

Rory Plaire

unread,
Nov 2, 2011, 8:53:31 PM11/2/11
to nhu...@googlegroups.com
My guess is that you are running a grid which is layout-virtual and not data-virtual. What this means is that the grid will pull all the data from the data source, but not create visuals for non-visible elements.
 
You will likely need to figure out how to virtualize the data access.


--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.


Ilia Ternovich

unread,
Nov 3, 2011, 12:52:45 AM11/3/11
to nhu...@googlegroups.com
Proper way to achieve what you want is to use pagination tech.

But this will require additional coding.

2011/11/3 Kevin Anderson <ke...@andersonplanet.com>:

Jason Meckley

unread,
Nov 4, 2011, 8:31:14 AM11/4/11
to nhu...@googlegroups.com
don't bind the grid directly to NH object. map the NH objects to view models and load the view model into the UI control.
Reply all
Reply to author
Forward
0 new messages