Hi.
I am using the TreeView component with a Hierarchical data binding and the 'showCheckBox' property set to true.
When I open the tree view page, I need to set some nodes as checked and of course display it in the relative checkbox.
How can I do?
I saw that there is the possibility to check all nodes (with the checkAll () method), but I only have to check some of them. Besides, even when I use the checkAll () method, I don't see the checkboxes of all the nodes checked.
Could you give me a simple example of how I can realize this need of mine?
Thanks for your help
|
public field: Object = {
dataSource: this.countries,
id: 'id',
parentID: 'pid',
text: 'name',
hasChildren: 'hasChild',
isChecked: 'isChecked',
};
{ id: 7, name: 'Brazil', hasChild: true, isChecked: true },
|
|
<ejs-treeview id="tree" [fields]='fields' showCheckBox="true" [checkedNodes]="checkedNodes"></ejs-treeview> |
|
public checkedNodes: string[] = ['CUB', 'MEX']; |
Ok.
You have been very kind and very helpful.
Thank you
It looks so good as usual. I'm so much happy to know more about it here. Thanks for posting.