Declined
Last Updated: 11 Sep 2018 12:02 by ADMIN
To reproduce:

Add a RadMenu and a RadMenuItem. To the RadMenuItem add another items, make some of them disabled. Open the first menu item and navigate with the arrows, you will see that the disabled items are selected but no visually.

They should be skipped during navigation

Workaround:

Use the following custom RadMenuItem. The navigation logic is overriden in the RadDropDownMenu:

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;

    var itemIndex = this.Items.IndexOf(selectedItem);
    for (int i = itemIndex; i < this.Items.Count - itemIndex; i++)
    {
        nextItem = this.GetNextItem(nextItem, !isUp);
        if (nextItem.Enabled)
        {
            break;
        }
    }

    this.SelectItem(nextItem);

    return true;
}


    public override string ThemeClassName
    {
        get
        {
            return typeof(RadDropDownMenu).FullName;
        }
        set
        {
        }
    }
}

Declined
Last Updated: 13 Jun 2018 07:05 by ADMIN
Note:  this problem is reproducible with RadTextBoxControl as well. The Enter and Leave events also don't fire when RadTextBoxControl is inside a RadPopupContainer

Resolution:

Case 1:
RadTextBoxElement is not a control and do not have validation events. Use RadTextBox with RadMenuHostItem instead:

RadTextBox tb = new RadTextBox();
RadMenuHostItem item = new RadMenuHostItem(tb);
tb.Validating += Tb_Validating;
item.MinSize = new Size(50, 20);
radMenu1.Items.Add(item);

Case 2:

RadPopupEditor has message filter which is responsible for closing the popup and it intercept the leave and enter messages. Use GotFocus and LostFocus instead.
Declined
Last Updated: 10 Nov 2014 12:05 by ADMIN
Created by: Steven
Comments: 2
Category:
Type: Bug Report
0
When right clicking on a control near the bottom of the screen, the context menu (implemented as a RadContextMenu) opens downwards from the point where the mouse was clicked. This results in the majority of the menu going off the bottom of the screen.

On subsequent right clicks in the same area, the context menu opens upwards from the click position, which is correct functionality as the menu is not obscured.

The menu is shown by calling:
contextMenu.Show(viewerControl, e.Location);

The bug occurs the first time that the context menu is shown on a control.