Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
850
Set a Node on client side
posted

Hi,

 

I am using WebDataTree for my project. I have a requirement which I need to address immediately.

Can anyone please tell me how to set a node active on the client side, when I right click on the node.

 

Parents
  • 49378
    Suggested Answer
    posted

    Hi nancy1985,

    Thank you for posting in the community.

    Activating a node when right-clicked can be achieved by handling the NodeClick clientside event. For instance:

    Code Snippet
    1. function WebDataTree1_NodeClick(sender, eventArgs)
    2. {
    3.     ///<summary>
    4.     ///
    5.     ///</summary>
    6.     ///<param name="sender" type="Infragistics.Web.UI.WebDataTree"></param>
    7.     ///<param name="eventArgs" type="Infragistics.Web.UI.DataTreeNodeEventArgs"></param>
    8.     if (eventArgs.get_browserEvent().button == 2) {
    9.         ig_controls.WebDataTree1.set_activeNode(eventArgs.getNode());
    10.     }
    11. }// -->

    Hope this helps.

Reply Children