Hi Ayush
Thanks for contacting syncfusion support.
Query: Actually what I want is I want to show uncheck checkbox after the
popup is hide
Based on your query, we understand you need to uncheck
the checkbox after popup is hide. We have achieved your requirement by using the
selectCheckboxes and getCheckedRowIndexes methods of the treegrid.
Please refer to the below code example,
….
export class AppComponent {
…
@ViewChild('treegrid')
public treegrid: TreeGridComponent;
@ViewChild('dialog')
public alertDialog: DialogComponent;
public alertDlgButtons: Object[] = [
{
buttonModel: {
content: 'Cancel',
cssClass: 'e-flat',
},
click: function (args) {
var treegrid =
document.getElementsByClassName('e-treegrid')[0].ej2_instances[0];
treegrid.selectCheckboxes(treegrid.getCheckedRowIndexes()); //deselect the checkboxes
treegrid.clearSelection();// cleare the row selection
this.hide(); // hide the dialog using dialog's hide method
},
},
];
|
In the above code example, in the
dialog’s cancel button click we deselect the checkboxes using selectCheckboxes
method of the treegrid.
Please refer to the below sample,
https://stackblitz.com/edit/angular-ohfqfv-yfp9zg?file=app.component.html,app.component.ts
Please refer to the below API documentation,
https://ej2.syncfusion.com/documentation/api/treegrid/#getcheckedrowindexes
https://ej2.syncfusion.com/documentation/api/treegrid/#selectcheckboxes
Kindly get back to us for further assistance.
Regards,
Pon
selva
If this post
is helpful, please consider Accepting it as the solution so that other members
can locate it more quickly.