Solved

asp.net c# TreeView1_TreeNodeCheckChanged not firing

Posted on 2007-03-20
6
878 Views
Last Modified: 2012-08-13
I am trying to run some code when a node is checked (specifically recursively checking child nodes)

BUt when I run the code nothign happens..I am using teh TreeView1_TreeNodeCheckChanged event handler and it is wired into the control..but it never runs the code...debugging stops dont ever get fired.

DOes this event only run on postback or something?

Should I be using a diferent event handler?
0
Comment
Question by:Prysson
  • 3
  • 3
6 Comments
 
LVL 16

Expert Comment

by:Edwin_C
ID: 18756347
You are correct.  You can catch this event only after postback.  You may try using the SelectedNodeChanged event.  It is fired when user clicks on the node.
0
 

Author Comment

by:Prysson
ID: 18756709
Does checking a node cause the SelectedNodeChanged event to fire?
0
 

Author Comment

by:Prysson
ID: 18756730
Never mind it doesnt..this wont work for me. I have to have the check boxes recursivley check and uncheck when other boxes are checked.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 16

Expert Comment

by:Edwin_C
ID: 18756846
Do you mean you can allow users to check one item only?  If so, treeview seems to be not suitable for you.  Can you use radiobuttonlist?
0
 

Author Comment

by:Prysson
ID: 18756930
no its not a single selection. I need child nodes to be checked when the parent node is checked and parent node to uncheck when a child node is unchecked. I have the code to do this but the only event handler that deals with the check boxes is the checkchanged EH...seems kind of retarded to me that the treeview doesnt have a means of firing and event when someone checks a check box.
0
 
LVL 16

Accepted Solution

by:
Edwin_C earned 500 total points
ID: 18757098
I think this can be done at client side with javascript.  I found this in the internet http://forums.asp.net/3/1238700/ShowThread.aspx

I have used the treeview from telerik which has this function using simple javascript.  See http://www.telerik.com/community/forums/thread/b311D-cekgk.aspx

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now