This is a migrated thread and some comments may be shown as answers.

How to Control Context menu & RadToolTip in the TreeView

3 Answers 106 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mallikharjun Mulagundla
Top achievements
Rank 1
Mallikharjun Mulagundla asked on 22 Sep 2011, 11:41 AM
Hi, I have enabled context menu & RadToolTip in the TreeView nodes. Once If hover my mouse and right click, I am getting both ToolTip and Context menu.How to control this. If I right click, have to close radToolTip and just display Context menu.

Thanks in advance.

Thanks,
Mulagundla


3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Sep 2011, 12:31 PM
Hello Mallikharjun Mulagundla,

You can explicitly hide the tooltip by calling the hide() method.
javascript:
function OnClientContextMenuShowing(sender, args)
    {
        var tooltip = $find('<%=ToolTip1.ClientID %>');
        tooltip.hide();
    }

Thanks,
Shinu.
0
Mallikharjun Mulagundla
Top achievements
Rank 1
answered on 23 Sep 2011, 08:23 AM
Thanks Shinu for your quick reply. it worked for me. But still some times(If we slightly move coursor) am getting both Context menu & Rad Popup. So i want to Add condition like  If contextMenu is enable then also don't show popup in the OnClientMouseOver Event
So is there any method to check whethere Contextmenu is enabled or disabled?

Thanks again...

Thanks,
Mulagundla
0
Princy
Top achievements
Rank 2
answered on 23 Sep 2011, 10:45 AM
Hello Mulagundla ,

Try the following client side approach to achieve your scenario.

javascript:
function OnClientMouseOver(sender, args)
 {
   var tooltip = $find('<%=ToolTip1.ClientID %>');
   if (args.get_node().get_enableContextMenu())
    {
    tooltip.hide();
    return;
    }
   tooltip.show();
  }

Thanks,
Princy.
Tags
TreeView
Asked by
Mallikharjun Mulagundla
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mallikharjun Mulagundla
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or