Results 1 to 3 of 3

Thread: RESOLVED - Selecting TreeView node in ASP.NET

  1. #1

    Thread Starter
    Lively Member tgoodmannz's Avatar
    Join Date
    Sep 2000
    Location
    Mid On at the Pavillion End
    Posts
    102

    Red face RESOLVED - Selecting TreeView node in ASP.NET

    Hi,

    Is it possible to raise an event in an ASP.NET form when a TreeView node is selected??

    I've tried the following events - neither which seem to be raised at run-time when I select a node...

    Code:
     
        Private Sub TreeView1_SelectedIndexChange( _
            ByVal sender As Object, ByVal e As Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs) _
             Handles TreeView1.SelectedIndexChange
    
    
            mClientCL.UPAlert(e.NewNode())
    
        End Sub
    
        Private Sub TreeView1_Expand( _
            ByVal sender As Object, ByVal e As Microsoft.Web.UI.WebControls.TreeViewClickEventArgs) _
            Handles TreeView1.Expand
    
            mClientCL.UPAlert(e.Node())
    
        End Sub
    Is it possible or do I need to do something else to get an event to fire??? Any suggestions would be appreciated.

    Tim
    Last edited by tgoodmannz; Mar 24th, 2003 at 08:22 PM.

  2. #2

    Thread Starter
    Lively Member tgoodmannz's Avatar
    Join Date
    Sep 2000
    Location
    Mid On at the Pavillion End
    Posts
    102
    OK OK - I realised what my issue was. I'm still not used to the Server side/Client side separation in ASP.NET.

    Basically I don't want to fire a server side event on a selection change, so I can wait till some other event and then read the value.

    However - using the Microsoft TreeView Webcontrol, surely you should be able to fire a server side event when selecting a Node???

  3. #3

    Thread Starter
    Lively Member tgoodmannz's Avatar
    Join Date
    Sep 2000
    Location
    Mid On at the Pavillion End
    Posts
    102

    Duh....

    Of course .. if I set the AutoPostBack property to True .. it works!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width