This is a migrated thread and some comments may be shown as answers.

Get item id list for selected items

3 Answers 419 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
LittleDragon
Top achievements
Rank 1
LittleDragon asked on 19 Sep 2020, 09:10 AM

right now we can see node index values we can get as sleeted values instead of this i need to get below

lets say we have unique ID value for each node items then we select the items on tree I need to get that  unique ID value as selected values

how can I achieve this ?

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 22 Sep 2020, 09:04 AM

Hello,

Thanks for the screenshot.

In order to capture the selected dataItem in TreeView, use selectionChange event:

https://www.telerik.com/kendo-angular-ui/components/treeview/selection/#toc-modifying-the-selection

https://stackblitz.com/edit/angular-1qph6q?file=app/app.component.ts

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
LittleDragon
Top achievements
Rank 1
answered on 23 Sep 2020, 03:01 PM

Hi Martin

 

by using  (checkedChange)="handleChecking($event)"  I was able to access the data item but how can I identify whether user check on checkbox or unchecked ?

0
Martin
Telerik team
answered on 24 Sep 2020, 11:22 AM

Hello,

For that purpose, the developer can utilize the checkedChange event. It fires each time when the user selects a TreeView node checkbox.

In case of further questions do not hesitate to write back.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TreeView
Asked by
LittleDragon
Top achievements
Rank 1
Answers by
Martin
Telerik team
LittleDragon
Top achievements
Rank 1
Share this question
or