Solved

asp.net c# TreeView1_TreeNodeCheckChanged not firing

Posted on 2007-03-20
6
887 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Keyboard 2 34
Cant save 3D 4 21
Winform Module - What is the ASP.Net equiv 2 23
Can I command line build a C# application? 6 33
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

831 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