Hi,
I've just realized that I am unable to create new children rows where the father row starts with zero children. I try to explain better what I mean.
Suppose to have 2 rows: the first one can be expanded in a subgrid with different children. Here I can decide to add a new child, to delete one or to edit some of these children. I can do this enabling Update feature also on the child grid (what I usually call subgrid). But let's come back to the second row. It does not have children, but I'd like to introduce dfferent ones. How can I do if I can't see the expand icon? And not expanding I am not able to see the "Add new row" functionality...
Probably it is just a simple thing, but I don't know how to solve this issue...
Thanks,
Flavio
you can enable Load on demand (LoadOnDemand = true in the MVC wrapper, or set initialDataBindDepth to 0 in the options, if you are using just the client-side widget). this way expand indicators ("plus" images) will always be loaded, no matter if the parent row has children or not. if it doesn't have children, when expanded, the child grid will be empty and will have the add new row UI.
It's not possible to achieve this out of the box if you don't use load on demand, because the grid automatically analyses the data source upfront, on data-bind, and doesn't render the expand indicators if there aren't any children. That's only when it's binding directly to the whole data source - i.e. no load on demand.
Hope it helps. Thanks,
Angel
"...set initialDataBindDepth to 0 in the options, if you are using just the client-side widget..."
This can interest me, but is it only available through javascript? In Razor language I am not able to see that option, and so to use it. Through javascript code, if I set initialDataBindDepthlike an inizialization, I have something wrong, because I cannot see my grid populating, just loading and loading and loading..without any kind of visible data...
Hi Flavio,
as per my previous post, that's what the LoadOnDemand = true/false does in the MVC wrapper. there is no initialDataBindDepth equivalent, it's either true (0) or -1 (false).
all of the load on demand functionality is automatic in the MVC wrapper, you only need to set LoadOnDemand(true).
Thank you for your patience Angel.
If I've understood weel, Load on Demand expects a Data Source Url, right?
Is there a sample related to MVC wrapper Load On Demand set to TRUE ?
Thanks Angel,
it was right.
Regards,
yep, you can have a look at this sample:
http://samples.infragistics.com/jquery/hierarchical-grid/hierarchical-grid-load-on-demand
Hope it helps.