Unplanned
Last Updated: 19 Jun 2021 16:55 by ADMIN
Christian
Created on: 25 Jul 2020 19:07
Category: Drawer
Type: Feature Request
6
Drawer Item Enabled Property Data Binding

Hi,

 

could you add an Enabled Parameter (like in the Button Component) to the default databound values from a Drawer Item?

Of course I can handle this with a template, but actually I dont like to implement the whole item behaviour and the looks.

Ok, I a little bit lazy, but I think this would be a find addition to the feature set.

 

Best regards

Christian

5 comments
ADMIN
Marin Bratanov
Posted on: 19 Jun 2021 16:55

Hello Enrico,

If you click the Follow button on this page, you will get an email when this feature gets implemented. The purpose of this page is to let you track that - at the moment an Enabled parameter is not available in the drawer and when it becomes available we will update the documentation: https://docs.telerik.com/blazor-ui/components/drawer/data-bind. I expect that when it gets implemented that will be the exact behavior - there will be an EnabledField parameter of the component so you can point it to a boolean field in your model - and if the value there is false, the item would be grayed out and unclickable.

At the moment, the only way to do that is through a custom template.

Regards,
Marin Bratanov
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/.

Enrico
Posted on: 18 Jun 2021 08:53

Good morning,

also our team is looking for the possibility to enable/disable a specific drawer item on drawer control.

Actually there is no "Enabled" property on the available bindings. 

We expect that when Enabled == false drawer item is disabled with an opacity standard value.

Thank you

ADMIN
Marin Bratanov
Posted on: 27 Jul 2020 07:15

Hi Christian,

If the solution I posted would not work for you (a foreach loop in the drawer Tempate plus a few methods that you implement based on our repo once per app), you can consider using a vertical menu in the sidebar - it will have disabled items in our next release.

I agree with you that the components are similar and having that feature would be great in the drawer. It might even make sense for the treeview as well.

 

Regards,
Marin Bratanov
Progress Telerik

Christian
Posted on: 26 Jul 2020 11:47

Hi,

 

I read the upcoming Bindings tor the menu items and I think it would be super handy if the drawer Item Bindings would be pretty much the same.

The Drawer and Menu components are quite similar (regarding the items), so the same Bindings would be a really good thing for a developer using the components.

Best regards

Christian

ADMIN
Marin Bratanov
Posted on: 26 Jul 2020 10:46

Hello Christian,

You can find an example here that, among other things, shows how to get the default rendering of the drawer in its Template so you can customize it: https://github.com/telerik/blazor-ui/tree/master/drawer/template. This can make disabling items easier. I'm also attaching here a modified version of the layout page that shows one way to implement disabled items.

By the way, in the upcoming 2.16.0 release, the Menu will have disabled items binding - you can preview how that would work here.

 

Regards,
Marin Bratanov
Progress Telerik