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

Tooltip for Treeview selectednode that has child on onnodeclick

2 Answers 61 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Cuneyt
Top achievements
Rank 1
Cuneyt asked on 04 Jan 2013, 08:56 AM
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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Jan 2013, 09:27 AM
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.
0
Cuneyt
Top achievements
Rank 1
answered on 04 Jan 2013, 01:24 PM
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.
Tags
ToolTip
Asked by
Cuneyt
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Cuneyt
Top achievements
Rank 1
Share this question
or