Hi!
I am starting to use the grid but I have some problems.When I fill the grid with data and their children, the hierarchy column (or whatever it is called) shows in all rows the icon but there are not child data in all rows! So when I expand the grid it tells me "Grid has no data." Of course.
In Ignite js grid only shows "+" icon if you have child data! Is there any way to correct this error with templates?In addition, the documentation so far is a bit painful for Ignite Angular product. Where is the Ignite js style documentation? How do I use the templates? Are there any examples?
Thanks
Paul
Hi Paul,
There’s a way to hide the expansion icons for an igx-row-island that has no data. Our igxHierarchicalGrid provides an input to bind to a variable, which would define whether the icon should be displayed or not. That input is called hasChildrenKey. You’d have to manually do a check for the existence of data in the child grid and if there’s no data, then unset the variable, that’s responsible for the parent’s expand icon. There’s no way that we could make that check automatically, ever since when the data is loaded on demand, we cannot determine whether the child grid would have any data, prior its opening.
I’m providing you with a Stackblitz sample, forked from the igxHierarchicalGrid sample in the docs, to see what I meant with the upper explanations. Refer to the checkForEmptyChild function, which recursively checks for data presence in the children.
If you need any further assistance with that matter, please don’t hesitate to contact me.
And I’m sorry to hear that you find our IgniteUI for Angular docs not good enough. We’re constantly working on improving it.
All the best
Petko Bozhinov, Infragistics, Inc.
Sorry, my bad. I restarted the development server and it started workingThank you very much, Petko!
I cannot reproduce what you meant. I made a sample, where I tried to replicate your issue. I didn’t manage to, but if you wish, you might fork it, edit and send it back to me for a further investigation.
Best