Link to home
Start Free TrialLog in
Avatar of Relegence
RelegenceFlag for Israel

asked on

second click on treeview node with no selection change

Hi
I am working with TreeView in c#. I have an OnSelectedNodeChanged method.
When the user selects a node, it's caught and dealt with. But when the user selects the same node again, I can't catch it because I hadn't found a callback that deal with this.
Thanks
Osnat
Avatar of Priest04
Priest04
Flag of Serbia image

As event name says, OnSelectedNodeChanged, it is fired when the selected node is changed. In your case, selection is not changing. Use Click event instead.

Goran
Avatar of Relegence

ASKER

there is no such even for treeview..
i couldn't find any "onclick", "click", "onselect"..

Ah sorry, its an ASP.NET treeview. Yes, you are correct there is no Click event. YTou could get away with this:


protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
    TreeView1.SelectedNode.Selected = false;
}

Open in new window

Except i am not changing a node, therefore it never gets there. that's actually my problem, because i do have one OnSelectedNodeChanged method working already.
Again - I need something to catch a Non selection-change-click. Just a click on the Same node.
In this case, postback is called, but how can i catch this event?
ASKER CERTIFIED SOLUTION
Avatar of Priest04
Priest04
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are right, now i understand, i must have missed a part.
Thanks
Then why did you give me B grade? What part of the question is left unanswered?