Context Menu separators and disabling

Hi, any idea when you'll be able to support disabling of context menu items, and also when you'll add support for menu separators? Seems like these are pretty standard features that you'd expect with a context menu.

Thanks!

1 Like

Hi @Damselfly,

This is not on the roadmap currently. Also check here about feature requests and prioritisation.

Not to worry. I figured out how to do myself. With a bit of CSS styling this looks great.

contextMenuService.Open(args, ds =>
           @<RadzenMenu Click="OnMenuItemClick">
            <RadzenMenuItem Text="View Image" Value="0" />
            <hr class="separator">
            <RadzenMenuItem Text="@basketEntry" Value="1" />
            <RadzenMenuItem Text="Download" Value="2" />
            </RadzenMenu>);

and

hr.separator {
    width: 100%;
    margin: 1px;
    border-top: 1px solid #999999;
}

Screenshot 2021-02-03 at 23.12.08

1 Like

Hi all.
Because that message is more than 1 year old, I want to post a new question which is related to.
Is there any way to disable a RadzenMenuItem ?
Thanks.
SF.

2 Likes

Done something similar with a <hr> which is great in mark-up, but can't be done when programmatically creating a menu and items. Think an item with an "IsSeparator" flag would be useful.