I have a grid which is bound to one of my custom objects. The custom object contains child objects which means my grid also has child bands.
I have set the grid to LoadOnDemand and notice that when I select a row all the child objects are populated. is there a way to only populate the child objects when the user expands a row i.e clicks on the "+" sign and not when he just clicks on the row.
Thanks John
I'm still not clear on the issue.
When the grid is in OnDemand mode, it only asks for the rows it needs to display. So when you say that the child objects are being populated, what do you mean? Do you mean that your data object is populating the entire list? When is it doing this? What is the grid asking for that is causing your data object to load all of the child objects?
Or are you saying that the grid is asking for each individual child object in the collection?
In order for OnDemand mode to be of any real benefit, the data source itself has to be written efficiently and only load the data that is asked for. It sounds to me like maybe your data source is loading more than it needs to. Or maybe I am wrong and it's the grid that is asking for too much. But it's hard to tell from your description here.
Mike,
>>What do you mean when you say that all of the child objects are populated?Sorry for not being clear. What I meant was that when I click on a row in the grid, the children for that row get populated. I can see this hapenning as i have put a trace on the method in my business logic which gets the data. I only want this to happen when I click on the "+" not when I click on a row.
>>When are you populating the data in the data source?I have the grid set to LoadOnDemand so as mentioned above this currently happens when I click on a row in the grid
Hi John,
I'm not sure I understand. What do you mean when you say that all of the child objects are populated? The grid should only be asking for the visible rows. When are you populating the data in the data source?