Unplanned
Last Updated: 27 Jul 2020 11:21 by ADMIN
David
Created on: 27 Jul 2020 11:11
Category: Menu
Type: Feature Request
2
Add AutoScrollMinimumItemCount property to the RadContexMenu
Add property allowing the developer to define the maximum count of the items which can be shown in the drop-down without scrolling. For example, it the current items are 2, show no scrollbar (even if menu's DefaultGroupSettings.Height = 300px), but if the item are more than 10, use the set scrolling height.
1 comment
ADMIN
Vessy
Posted on: 27 Jul 2020 11:21

Hi,

A possible way to have set height only when the items in the Menu are too much (or more than 5, let's say), is to set the DefaultGroupSettings.Height dynamically in the server-side DataBound handler of the control.

For example:
                    <telerik:RadContextMenu runat="server" ID="contextDBColumns"
                        OnDataBound="contextDBColumns_DataBound"
                        ...
                    </telerik:RadContextMenu>
    protected void contextDBColumns_DataBound(object sender, EventArgs e)
    {
        RadMenu menu = sender as RadMenu;
        if (menu.Items.Count > 5)
        {
            menu.DefaultGroupSettings.Height = 200;
        }
    }

Regards,
Vessy
Progress Telerik