Hello,
I would like to add a CSS-Class to some items in my TelerikDrawer control. Since the ItemTemplate only controls the contents and the Template is overkill as it overrides the rendering for the entire drawer contents, I was wondering whether there was any support for adding custom CSS classes to items (similar to how it is described for Angular here: https://www.telerik.com/kendo-angular-ui/components/layout/drawer/items/).
TIA
- Chris
Hi Christian,
Indeed, currently there is no built-in way to add custom CSS classes for specific Drawer items. The full-blown Drawer <Template> is the only option, which I agree is an overkill.
We have a feature request for an OnItemRender event for the Menu. It makes sense for us to implement this also for the Drawer, so I am converting your forum thread to a feature request.
There is an easy workaround, but it doesn't work in Firefox (yet). Add a custom CSS class inside the <ItemTemplate> and target the parent DOM element with a :has() selector. Alternatively, implement the custom styling inside the item template itself, but I guess this is not possible or convenient in your case.
Regards,
Dimo
Progress Telerik