Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
485
Error in Igx-HierarchicalGrid to show expand icon!
posted

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

Parents
  • 40
    Verified Answer
    Offline posted

    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.

Reply Children