Completed
Last Updated: 21 Dec 2022 08:56 by ADMIN
Release 4.0.0 (18 Jan 2023) (R1 2023)
NovaStor
Created on: 13 Aug 2021 16:30
Category: TreeView
Type: Feature Request
9
Expose EnabledField for the TreeView items

Hi.

 

I'd like to request the ability to set the Enabled property on check boxes in the treeview.

 

For example, given a tree view with check boxes:


<TelerikTreeView Data="@StorageItems"
                 @bind-CheckedItems="@CheckedItems"
                 CheckBoxMode="TreeViewCheckBoxMode.Multiple"
                 CheckParents="true"
                 CheckChildren="true" />

I'd like to make the tree view read-only so the check boxes appear disabled and the user cannot check-mark or uncheck-mark them.

Thank you.

5 comments
ADMIN
Nadezhda Tacheva
Posted on: 30 Aug 2021 15:45

Hi NovaStor team,

Thank you for providing details on your desired scenario!

By the time EnabledField parameter is available for the TreeView items, you can use some custom CSS to disable the pointer events of the CheckBoxes. Thus, the users will not be able to check/uncheck them. See the example provided in this public post.

Regards,
Nadezhda Tacheva
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/.

NovaStor
Posted on: 27 Aug 2021 05:09

For our scenario, we would initially provide values for the checkboxes of all TreeView items and not allow the user to check/uncheck any of them, having the whole TreeView read-only.

Thank you.

ADMIN
Nadezhda Tacheva
Posted on: 25 Aug 2021 10:00

Hi NovaStor team,

Thank you for your confirmation!

I have tweaked the title a bit to denote that the request is for EnabledField of the whole TreeView item. I also updated the thread status to "Unplanned" which indicates this is a valid feature request, not scheduled for implementation yet. As you are creator of the post, you are automatically subscribed and will receive emails on status changes.

In terms of implementing this feature on our side, it will be useful if you can provide some details on the desired use case and how would you expect that feature to behave.

For example, if a child item is marked as disabled(read only), what would you expect to happen if the user checks the parent - shall the child also get checked along with the other enabled children or not? Or your desired scenario is to initially provide values for the checkboxes of all TreeView items and not allow the user to check/uncheck any of them, having the whole TreeView read only?

Thank you in advance! I will be looking forward to receiving your response!

Regards,
Nadezhda Tacheva
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/.

NovaStor
Posted on: 20 Aug 2021 15:16

Yes, the option do disable the entire tree view would be good option.

Thank you.

ADMIN
Nadezhda Tacheva
Posted on: 20 Aug 2021 08:03

Hello NovaStor team,

One option could be to implement an EnabledField for the entire item that will also disable the checkbox.

Would that be a good fit for your scenario? Please consider and let me know your thoughts.

Regards,
Nadezhda Tacheva
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.