Treeview control error when using autopostback

Treeview control error when using autopostback

Post by U3R1Y2 » Fri, 02 Apr 2004 20:16:12


I have created a new c# class which inherits the Microsoft treeview control. I have set autopostback = true in the constructor of my new class. I have created a new web page and created an instance of my new class and populated it from an XML file using code. I then add my control to the page so that it is displayed. All this works fine, but when a user clicks on a node that has child nodes I get the following error: Object expected. Then when I press break I get a there is no source code for the following location. Can any one suggest why I might be getting this error

All I want to do is beable to access the OnSelectedIndexChange event in my new inherited TreeView class
 
 
 

1. Controlling page height real estate used by TreeView Control

2. Assigning TreeView Class Instance to a TreeView Control

I have a TreeView population routine that is rather lengthy and have decided
to use a BackgroundWorker to run it in a background thread. Since I am
unable to access my TreeView control directly in the BackgroundWorker, I
create a new instance of a TreeView class in the background thread, populate
it, and then return it to my main thread through the e.Result
DoWorkEventArgs. All of this works fine.

My question is how do I assign this populated TreeView class instance to the
TreeView Control on my form? When I set my TreeView control to the populated
TreeView class instance nothing is displayed in the control. I have verified
that the nodes in the TreeView contain data. Any suggestion that anyone
might have would be appreciated.

--
Loren Baker

3. VB6 - Treeview Control - Moving Nodes from one Treeview to another

4. Issue with a custom TreeView derived from the TreeView control

5. Compile errors when using form control's "Control Source" property to refer to the control's value

6. Using right mouse click with MS Treeview control

7. Using the TREEVIEW control...

8. SQLDataSource binding to treeview control when using "FOR XML" on select

9. Using the TreeView control to create an Org Chart

10. Using Treeview inside UpdatePanel control

11. Using TreeView and ListView controls in Web Application

12. Using treeview control in Excel user form

13. Using wide charater strings in the TreeView control

14. Refering to Treeview on form from subform using control name and index

15. TreeView control: using drag and drop to move a node to another parent