17
Views
1
Comments
[zTree] Reason selectable by clicking on label on zTree
ztree
Web icon
Forge asset by Eduardo Luís
Application Type
Traditional Web
Service Studio Version
11.54.9 (Build 62390)

Hello everyone, 


I was asked if there's a way to select the options on a zTree component via the label and not only via the radio button.

As shown in the picture I need the item to be selected when clicked on the label that is selected and being pointed by the arrow.


labelClickingExample.png
2025-12-15 09-29-24
Thibaut G

Hi,

You can use the OnClick Callback from the Ztree API to identify when a specific node has been clicked:

After that, you can select the specific checkbox linked to the clicked node using a javascript widget and the 'SetChckDisabled' Function.



Sources:
ZTREE API DEMO
ZTREE API DOC

Kind Regards

Thibaut 




Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.