[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

asp.net c# TreeView1_TreeNodeCheckChanged not firing

Posted on 2007-03-20
6
Medium Priority
?
927 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

649 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