Can't using clearSelection to clear checked rows

I would like to use treegrid.clearSelection() to clear all checked rows but it's not affect to treegrid.


Here is fullcode: https://stackblitz.com/edit/angular-ivy-yx5oci?file=src/app/app.component.ts


1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team September 12, 2022 03:29 PM UTC

Hi Toanpham,


From you query, we understood that you need to clear the checked records of the checkbox column. clearselection method is used to deselect the selected rows alone not for checked rows. There is no separate method to clear the checked records. So we suggest to use the below workaround solution to clear the checked rows.


Refer to the code below:-

App.Component.ts:-

 

clearSelectedRows() {

        (document.getElementsByClassName('e-treeselectall')[0] as HTMLElement ).click(); //clear the checked rows

    }


Modified sample link:-  https://stackblitz.com/edit/angular-ivy-sgt4zn?file=src%2Fapp%2Fapp.component.ts


Note:- Also we would like to know that we don’t have virtualization support for AutocheckHierarchy feature.


Please get back to us if you need any further assistance.


Regards,

Farveen sulthana T


Loader.
Up arrow icon