Completed
Last Updated: 12 Oct 2018 09:46 by Dimitar
ADMIN
Dimitar
Created on: 03 Sep 2018 05:12
Category:
Type: Bug Report
0
FIX. RadMenu - Items are selected when disabled
Use attached to reproduce.
- open the menu and press the down arrow. This disabled items should not be selected.

Woekaround:
public class MyMenuItem : RadMenuItem
{
    public MyMenuItem()
        : base()
    {

    }

    public MyMenuItem(string text)
        : base(text)
    {
    }

    protected override RadDropDownMenu CreateDropDownMenu()
    {
        return new MyDropDown(this);
    }

    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadMenuItem);
        }
    }
}

public class MyDropDown : RadDropDownMenu
{
    public MyDropDown(RadElement owner)
        : base(owner)
    {
    }

    protected override bool ProcessUpDownNavigationKey(bool isUp)
    {
        var selectedItem = this.GetSelectedItem();
        RadItem nextItem = selectedItem;

        do
        {
            nextItem = this.GetNextItem(nextItem, !isUp);

        } while (!nextItem.Enabled);

        this.SelectItem(nextItem);

        return true;
    }


    public override string ThemeClassName
    {
        get
        {
            return typeof(RadDropDownMenu).FullName;
        }
        set
        {
        }
    }
}
Attached Files:
0 comments