Tooltip for Treeview selectednode that has child on onnodeclick

3 posts, 0 answers
  1. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 04 Jan 2013 Link to this post

    Hi.

    i have treeview that has onnodeclick event. and i want to add tooltip (text:this node has child) on treeview.selectednode if node has child.

    serverside or clientside, i dont know which way the best for this scenerio. i tried server side but i didnt get result.

    i read a few forum post and demos but i am a bit  confused. Could someone give me sample for this.

    thanks.


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Jan 2013 Link to this post

    Hi,

    Try the following code snippet to achieve your scenario.

    C#:
    protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        foreach (RadTreeNode node in RadTreeView1.SelectedNodes)
        {
            if (RadTreeView1.SelectedNode.Nodes.Count != 0)
            {
                RadTreeView1.SelectedNode.ToolTip = "this node has child";
            }
        }
    }

    Hope this helps.

    Regards,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 04 Jan 2013 Link to this post

    That was very easy. i tried something like targetcontrols.add.
    Actually this is not  i want to do that. this  shows tooltip just at onmouseover.
    I want to do that : when i click a node that has child, tooltip appear near selected node element  not onmouseover, and if i click a node that hasnt child dissapear.
    Regards.
    Thank you for your helps.
Back to Top