How to hide/show Drawer Items dynamically in jQuery

1 Answer 47 Views
Drawer
Sara
Top achievements
Rank 1
Sara asked on 10 Aug 2022, 12:37 PM | edited on 10 Aug 2022, 12:38 PM

Hello,

I am trying to hide/show drawer items based on user rights. I was trying to make it work with data binding, since the loading of said user rights happens at runtime and after the first initialization of the drawer control. But I can't get it to work.

Here is a small example of what I am trying to do: https://jsfiddle.net/1rk4f9L6/11/

 

Any tipps? Is it even possible to use data-bind on a drawer item?

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 15 Aug 2022, 12:25 PM

Hi,

Generally the Drawer is not a data-bound component and showing/hiding the items in the desired manner may be possible but only if used in a data-bound container. Is that the case? Can you provide an example of the real use of the drawer? If a binding container is not used I am afraid that the items should be hidden manually using JavaScript after the component is initialized.

Regards,
Angel Petrov
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/.

Sara
Top achievements
Rank 1
commented on 17 Aug 2022, 05:35 AM

Hi!

We do not use a data-bound container, sadly. It is very close to the fiddle with the drawer just inside a div pretty much without any other parent.

Thanks for the clarification! Will do it manually then.

Tags
Drawer
Asked by
Sara
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or