Hi lorryl,
Query#:- refreshColumns will affect the Checkbox state with ButtonClick
We are able to replicate the problem at our end with type checkbox column.
Before proceeding this we need to provide short description about autoCheckHierarchy and checkboxSelection.
Checkbox column:- While using checkbox column , when we click on any parent record checkbox then the child record checkboxes will get selected and parent record checkbox will get selected while checking all of its child items. The main purpose of this property is to render checkboxes in existing column.
CheckboxSelection:- Using “type” as “checkbox”, enables to perform multiple selection on clicking the checkbox. The main purpose of this is to perform selection.
In the previous update we have use autoCheckHierarchy, so it remains persist on refreshing the columns. In your code example you have used type checkbox column.
By default Selection won’t get persist on performing TreeGrid actions as well as refreshing the column using refreshColumns method. In order to persist the selection on performing operations we need to set persistSelection of selectionSettings property as true
Refer to the code example:-
|
App.Component.html
<ejs-treegrid #treegrid [dataSource] = 'data' allowPaging = 'true' childMapping = 'subtasks'[treeColumnIndex] = '1'[selectionSettings] = 'selectionsettings' >
<e-columns>
<e-column type='checkbox' width='50'></e-column>
<e-column field='taskID' headerText='Task ID' isPrimaryKey='true' width='70' textAlign='Right'></e-column>
. . .
</e-columns>
</ejs-treegrid>
App.component.ts
ngOnInit(): void {
this.data = sampleData;
this.selectionsettings = { persistSelection: true };
} |
Refer to the API Link:-
After following the above solution still faced issue, share us the following details.
- Complete TreeGrid code example.
- Share us the details about how you have handled show/hide checkbox on Hovering.
Please get back to us if you need any further assistance.
Regards,
Farveen sulthana T