We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

HoverMenuExtender on leaf node

I need to implement a treeview which has a special feature: when mouse move over a leaf node, pop up a panel, otherwise doesn’t pop up anything.
I am trying to implement this function with a treeview control and an asp.net ajax control toolkit “HoverMenuExtender”.
However, the HoverMenuExtender must specify TargetControlID, and when I set the value as treenode’s id. I get an error message as following, “Child Node1' is not a valid identifier.”
Does anyone know how to do that?

1 Reply

MS Mohamed Suhaib Fahad A. Syncfusion Team October 20, 2007 10:05 AM UTC

Hi Vincent,

Thanks for evaluating Syncfusion products.

Syncfusion TreeView Nodes cannot be treated as server control and the exception mentioned here will be thrown while trying.

However this requirement can be met with Syncfusion PopupControl. Normally TreeView control do not provide any ClienSideFunction to call on mouse over a TreeViewnode. But overriding the MouseHover & MouseOut events of TreeView control, Popup can be displayed while mouse over the TreeViewNode.

[Client-JavaScript]

window.onload=OverrideEvents;

function OverrideEvents()
{
//Backup the default MosueHover event
defaultHoverEvent=TreeViewObject.OnMouseOver;
//Override the event
TreeViewObject.OnMouseOver=function (oEl, e)
{
//check whether this event is triggered by TreeviewNode and MouseHoverNode is leaf Node
if( oEl.getAttribute('IsItem')!=null && oEl.getAttribute('ClntHasSubNodes')==null )
{
//Show popup
Popup.ShowPopup(e.clientX+15,e.clientY);
}
//Call routine
defaultHoverEvent(oEl, e);
}
//Backup the default MosueOut event
defaultOutEvent=TreeViewObject.OnMouseOut;
TreeViewObject.OnMouseOut=function (oEl, e)
{
//Hide Popup
Popup.HidePopup();
defaultOutEvent(oEl, e);
}

}

Please refer the below sample which illustrates the above in the following location,
http://websamples.syncfusion.com/samples/Tools.Web/5.2.0.25/38325/main.htm

Please let us know if you need more details.

Also please follow up with your Direct trac incident for further details.

Regards,
Fahad

Loader.
Live Chat Icon For mobile
Up arrow icon