Hi Customer,
Thanks for contacting Syncfusion Forums.
Query: Can’t collapse the row
We have validated the reported issue with the shared code example. On further validating, we could see that you have used the “childMapping” property as “childmapping”. So we suspect that the parent data alone is shown in the Tree Grid without child records and thus the expand/collapse icon has not been rendered. Due to this, you could not perform expand/collapse function.
We recommend that you to define the properties with proper casing (i.e. childMapping – letter M in uppercase) so that the property will work as expected.
Please check the below code snippet,
|
<TreeGridComponent dataSource={this.myData} treeColumnIndex={0} childMapping='childrens'>
<ColumnsDirective>
<ColumnDirective field='code' headerText='Code' template={this.template} width='120'
textAlign='Right'></ColumnDirective>
<ColumnDirective field='category' headerText='Category' width='100'></ColumnDirective>
<ColumnDirective field='productName' headerText='Product Name' width='100' textAlign='Right'/>
</ColumnsDirective>
</TreeGridComponent>
|
Please check the below screenshot,
We have prepared sample for your reference. Please check the below link,
Please check the below help documentations,
Still facing the issue, kindly get back to us with the below details,
- Complete Tree Grid rendering code
- Video demonstrating the issue
- If possible, kindly share issue reproducible sample or reproduce the issue in the above sample and share us.
- Also share your Product version details
Regards,
Padmavathy Kamalanathan