Link to home
Start Free TrialLog in
Avatar of csetzkorn
csetzkorn

asked on

TreeNodeCheckChanged

Hi,

I am trying to set the TreeNodeCheckChanged event from the code-behind like this:

tree_view.TreeNodeCheckChanged += new TreeNodeEventHandler(TreeView_CheckChanged);

....

void TreeView_CheckChanged(Object sender, TreeNodeEventArgs e)

I was hoping that this event fires when the user changes the status of a checkbox. Unfortunately, the event is only fired when the user clicks on a node, which is a bit weird.

What is wrong?

Thanks.

Chris
Avatar of csetzkorn
csetzkorn

ASKER

I have found the answer:

"The TreeNodeCheckChanged event is raised when a check box in the TreeView control changes state between posts to the server. This allows you to provide an event-handling method that performs a custom routine, such as updating a database or the displayed content, whenever this event occurs.

Even though the TreeNodeCheckChanged event is fired on post back, changing a check box does not cause a post back.
"

I am just wondering whether there is a way around this. Any takers? Thanks.

C
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America 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