Thanks for your reply.
The event handlers are in the Form1.cs file, inside: namespace
WindowsFormsApplication1
{
public partial class Form1 : Form
{
On Sep 3, 1:45 pm, Andrew Badera <[email protected]> wrote:
> Where are you adding the eventhandlers to the eventlisteners of the treeview?
>
> ∞ Andy Badera
> ∞ +1 518-641-1280
> ∞ This email is: [ ] bloggable [x] ask first [ ] private
> ∞ Google me:http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)
>
> On Wed, Sep 2, 2009 at 9:15 PM, netdev1<[email protected]> wrote:
>
> > I am trying to run some code when a node is checked (specifically
> > child nodes)
>
> > BUt when I run the code nothing happens..I am using different event
> > handlers..but it never runs the code...debugging breaks dont ever get
> > fired.
>
> > Does this event only run on postback or something?
>
> > Should I be using a diferent event handler?
>
> > namespace WindowsFormsApplication1
> > {
> > public partial class Form1 : Form
> > {
> > public Form1()
> > {
> > InitializeComponent();
> > // start off by adding a base treeview node
>
> > //TreeNode mainNode = new TreeNode();
>
> > //mainNode.Name = "mainNode";
>
> > //mainNode.Text = "Main";
>
> > //this.treeView1.Nodes.Add(mainNode);
>
> > TreeNode tnRoot = treeView1.Nodes.Add("Root");
> > TreeNode tnRoot2 = tnRoot.Nodes.Add("Root_2");
> > TreeNode tnChild = tnRoot2.Nodes.Add("Child1");
> > }
>
> > private void treeView1_NodeMouseClick(object sender,
> > TreeNodeMouseClickEventArgs e)
> > {
> > MessageBox.Show(e.Node.Text);
> > }
>
> > private void treeView1_AfterExpand(object sender,
> > TreeNodeMouseClickEventArgs e)
> > {
> > MessageBox.Show(e.Node.Text);
> > }
>
> > private void treeView1_AfterSelect(object sender,
> > TreeViewEventArgs e)
> > {
>
> > try
> > {