- Home
- Forum
- Angular - EJ 2
- Collapse All fails when adding a row
Collapse All fails when adding a row
I click a button and call this code, which adds a row to the treegrid, then I call collapse all and it crashes. is there something I need to do to refresh the state of the treegrid before I call collapseall?
let category = new Category();
category.isParent = true;
category.text = "Test"
this.dataLoadService.data.categories.unshift(category);
let child = new Category();
child.text = "hello";
//category.children=[child]
this.treegrid.refresh();
this.treegrid.collapseAll();
file: ej2-treegrid.es2015.js
Line 5353
this.uniqueIDCollection does not have any values matching record.uniqueID and the grid crashes when collapseall is called.
if (!isChild || isCountRequired(this)) {
record.expanded = false;
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
}
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
PS
Pon Selva Jeganathan
Syncfusion Team
September 22, 2021 12:22 PM UTC
Hi Zachary,
Thanks for contacting syncfusion forum.
Query: Collapse All fails when adding a row
We checked your query by preparing sample based on your code snippet, but We are unable to reproduce the issue at our end.
Please refer to the below sample,
Please refer to the below video demo.
After following the above reference, still faced issue please share us the following details.
- Share the product detail version.
- Share the Tree Grid rendering code example.
- Share the screenshot of stacktrace details(face if any)
- If possible, reproduce the issue in the attached sample or share the issue reproducible sample.
- Share the video demo of the issue.
The provided information will be helpful to provide you response as early as possible.
Regards,
Pon selva
Marked as answer
ZA
Zachary
September 22, 2021 06:06 PM UTC
Thanks Pon,
I worked around it so I should be ok, but I figured I would ask in case I was missing something major.
-Zack
PS
Pon Selva Jeganathan
Syncfusion Team
September 23, 2021 11:33 AM UTC
Hi Zachary,
Thanks for the update.
We are glad to hear your query has been solved.
Kindly get back to us for further assistance. We are happy to assist you.
Regards,
Pon selva
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
ZA Zachary
- Sep 21, 2021 03:27 PM UTC
- Sep 23, 2021 11:33 AM UTC