|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SelectedIndexChange event is not working in Microsoft.Web.UI.WebControls treeview
I'm using a Microsoft.Web.UI.WebControls treeview in my web application (ASP.NET 1.1). It is working fine and i have built a tree with data.
Now i need to load some pages according to the node which user clicks. I'm not able to get selected node details. There's a event called "SelectedIndexChange". But it is not firing properly when i clicked on tree nodes. Any one over there who used it??? or any ideas??? Thank you very much in advance.. |
|
#2
|
|||
|
|||
|
Hi,
I am also doing R&D on TreeView but could notdo in ASP.NET1.1.How did u do.Please tell. I will do and then I can check ur problem. Thanks Quote:
|
|
#3
|
||||
|
||||
|
Quote:
So, either you're using .NET 2.0, or you're using another TreeView control (which might be from Microsoft itself as well, I vaguely remember they had some TreeView Control on www.asp.net before) Please specify which TreeView you use, so that we can try to help you in an efficient way. |
|
#4
|
|||
|
|||
|
hi
thank you very much for replying my post. yes .NET 2.0 only have the in built web tree view control I’ll brief u my problem. so then both of u can get a idea what i have been doing. I’m developing a web application using ASP.NET 1.1(VB). Since there is no inbuilt tree view component for web applications in .NET 1.1 I’m using Microsoft.Web.UI.WebControls.TreeView control. I have successfully bound data which retrieved from database. Now I need to do an operation (display another set of data in a separate grid) based on the tree node which user selects. So I have written my code for SelectedIndexChanged. My problem is this event is not firing properly. This is my aspx file. <iewc:treeview id="trvCategory" runat="server" AutoPostBack=true> <iewc:TreeNode Text="Category" Expanded="true" /> </iewc:treeview> This is my Page_Load Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then LoadTree() End If End Sub And This is my SelectIndexChanged event Public Sub trvCategory_SelectedIndexChange(ByVal sender As Object, ByVal e As Microsoft.Web.UI.WebControls.TreeViewSelectEventAr gs) Handles trvCategory.SelectedIndexChange ‘MY CODE End Sub I have tried all following methods too. I found that I should create handler separately so I add following line in page_load AddHandler trvCategory.SelectedIndexChange, AddressOf trvCategory_SelectedIndexChange And in another article asked to do above in InitializeComponent And I have done following as well <iewc:treeview id=" trvCategory " runat="server" onSelectedIndexChanged="trvCategory_SelectedIndexChange" AutoPostBack=true> <iewc:TreeNode Text="Category" Expanded="true" /> </iewc:treeview> But none of these are working. If u can give me a solution that’ll be a great help Thank you very much |
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > SelectedIndexChange event is not working in Microsoft.Web.UI.WebControls treeview |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|