I'm currently using a BO that is similar to CSLA and am considering moving to CSLA.
I wonder if someone knows the following:
I have a typical bosetup with a setup like this:
Orders - various properties (Idnum, Order_Date, etc) plus a property for OrderItems
In a Windows form I use two binding lists to display the orders and orderitems in DataGridViews. The OrderItems binding list is bound to the OrderItems property of the Orders object.
When I load the Orders for a customer, ALL of the OrderItems child objects are loaded for Orders that are displayed in the dgv. i.e. when there are four Orders in the dgv, I get all four OrderItems objects loaded and I really only want the current Orders - OrderItems object loaded. If I page down in the dgv, a whole new set of OrderItems are loaded. If I disconnect the dgv and use textbox displays for the Orders list, I get only one child OrderItems loaded at a time.
This is not a problem when the OrderItems lists are small, but this client can sometimes have 1,0000 items in an order so it gets noticeably slow if the grid shows 20 rows.
I'm pretty sure this is a "feature" of Windows and DataGridViews but does CLSA also load all Child objects when the parent object is visible in a dgv?
regards,
rick
Thanks Andy,
Yes, I have tried that type of setup and it does work, however it does not seem to take advantage of the automatic loading and other features of a Child object (unless I am missing something).
I would like to load and display the OrderItemsList automatically since it is a child of the OrdersList objects, but when I use the datagridview, all the child OrderItems load. I want the child OrdersItemList to load only when needed, i.e. when the client switches to a tab with a datagridview or textboxes that are bound to the child.
In this senario, does Csla do the same thing?
Regards,
Rick
Copyright (c) Marimer LLC