Declined
Last Updated: 26 Dec 2014 12:07 by ADMIN
ADMIN
Peter
Created on: 08 Dec 2014 09:43
Category: UI Framework
Type: Feature Request
0
ADD. RadContextMenu - enhance in way to provide which control has been clicked in order to open the context menu.
The context menu does not provide which control has been clicked.
Workaround:

Point p;
Control currentControl;
 
void radContextMenu1_DropDownOpened(object sender, EventArgs e)
{
    p = ((RadContextMenu)sender).DropDown.Location;
    TraverseControls(this);
}
 
public void TraverseControls(Control ctrl)
{
    foreach (Control control in ctrl.Controls)
    {
        if (control == ctrl.GetChildAtPoint(ctrl.PointToClient(p)) && control.Controls.Count > 0)
        {
            currentControl = control;
            TraverseControls(control);
        }
        else if (control == ctrl.GetChildAtPoint(ctrl.PointToClient(p)))
        {
            currentControl = control;
        }
    }
}
1 comment
ADMIN
Stefan
Posted on: 26 Dec 2014 12:07
Duplicate of: http://feedback.telerik.com/Project/154/Feedback/Details/111316-add-provide-information-about-the-clicked-control-in-the-arguments-of-radcontext