Hi,
I'm using a igx-tree-grid with the load on demand for sub grids as stated in the demo:
https://ko.infragistics.com/products/ignite-ui-angular/angular/components/treegrid/load_on_demand.html
Scenario: When i Search for both parentID and children IDs.On the search, the parent row loads perfectly with arrow expand indicator. On click of arrow indicator, children rows are loaded properly.
Issue: When i search for parent as well as child ids, Igx Tree Grid loads with parent rows, child rows and arrow indicator as result. When i click on arrow indicator, sub-grid data (children rows ) are displayed. when i click on expansion indicator for parent row, child rows show. but when i click on the expansion indicator for child row, the next parent row that has child row data does not show its child rows.
To resolve the issue: I want to load the child rows for each parent row irrespective of if the parent row has data of parent and child ids.
Please help me with this.
This is a bug in igx tree grid load on demand. As we are using this feature, we need a quick work around or fix. Reply ASAP.
Hello Shobhana,
Thank you for posting in our community.
In order to ensure that your issue is addressed correctly, I will need some additional information regarding your scenario. Can you please elaborate on what kind of search feature you are using? If you are using the Angular Tree Grid Searching through virtualized content, could you please provide me with more details about the configuration that you have made? For example, are you searching for records that are not loaded yet or only for that are already rendered? If your use case is to search records that are not loaded yet, I will need to provide me with code example for the implementation of that searching or with an isolated sample, which I can debug on my side.
This information is going to be highly appreciated and will help me in my further investigation.
Looking forward to hearing from you.
Regards,Viktor KombovEntry Level Software DeveloperInfragistics, Inc.
Please reply ASAP!!
At this point we do not provide an out of the box option for getting the root node of a certian row. What I can suggest is creating a recrusive function on application level and using the parent property of IgxTreeGridRow to get the root node of the row:
const rootRow = this._getRootRow(currRow); private _getRootRow(row: RowType): RowType { if (row.parent) { row = this._getRootRow(row.parent); } return row; }
I created a small sample illustrating my suggestion, which you can find here. Please test it on your side and let me know whether you find it helpful.
Hello Viktor,
I have a query where i am using igx tree grid and the parent id has 3 children and one of the children has 3 sub-children ids. Now the sub-child has to access the parent id. Is there a way to do so?
Thank you for your patience while I was looking into this matter for you.
The Tree Grid will be not rendered as expected when the primary keys of the records are not not unique. As mentioned in Angular Tree Grid Overview and Configuration topic in our official documentation, if Primary and Foreign Keys are used, the primary key will be the unique identificator of every record, which means that the primary keys of the recrods must be unique.
In order to be able to assist you further I will need some additional information regarding your scenario. Could you please elaborate on for what pupose you need to have two different records with the same primary key?
Helli Viktor,
Can u reply to my query?
Hi Viktor,On Click of expansion indicator, we call getData() method does it take primary key by logic?