|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
2.0 TreeNodeI've got a treeview that i'm filling using PopulateOnDemand (ajax calls).
The TreeNode isn't sealed, so I thought I could extend it (call the new one SuperTreeNode) and add a bunch of data to the new node that I need to keep track of. But when the TreeNodePopulate event fires and I get the node from the TreeNodeEventArgs, it isn't the same node I put in the tree, its an actual TreeNode that just looks like my SuperTreeNode, minus all my important data. Is there any way to change this behavior? I suspect the problem lies in the javascript behind the call, so that leads me to believe that I don't have much chance to get around it. Would it be better to put my data in a custom HierarchicalDataSource? And if I do this, will I be able to figure out which of the datasource's nodes I need to fill from TreeNodeEventArgs.Node? TIA. Hi,
not 100% following what you mean? Is it that the kethod just returns your custom tree node by using base TreeNode type (polymorphism basics) Can you show a sample code snippet? Show quoteHide quote "William Sullivan" <WilliamSulli***@discussions.microsoft.com> wrote in message news:AD200095-B537-4C29-8CC9-83C5F4DECE04@microsoft.com... > I've got a treeview that i'm filling using PopulateOnDemand (ajax calls). > The TreeNode isn't sealed, so I thought I could extend it (call the new > one > SuperTreeNode) and add a bunch of data to the new node that I need to keep > track of. But when the TreeNodePopulate event fires and I get the node > from > the TreeNodeEventArgs, it isn't the same node I put in the tree, its an > actual TreeNode that just looks like my SuperTreeNode, minus all my > important > data. Is there any way to change this behavior? I suspect the problem > lies > in the javascript behind the call, so that leads me to believe that I > don't > have much chance to get around it. Would it be better to put my data in a > custom HierarchicalDataSource? And if I do this, will I be able to figure > out which of the datasource's nodes I need to fill from > TreeNodeEventArgs.Node? TIA. I've had to drop the idea and do manual data binding due to time limitations,
and apparently I deleted the cs file with the tree in it. Thanks anyhow. Show quoteHide quote "Teemu Keiski" wrote: > Hi, > > not 100% following what you mean? Is it that the kethod just returns your > custom tree node by using base TreeNode type (polymorphism basics) > > Can you show a sample code snippet? > > -- > Teemu Keiski > ASP.NET MVP, AspInsider > Finland, EU > http://blogs.aspadvice.com/joteke > > "William Sullivan" <WilliamSulli***@discussions.microsoft.com> wrote in > message news:AD200095-B537-4C29-8CC9-83C5F4DECE04@microsoft.com... > > I've got a treeview that i'm filling using PopulateOnDemand (ajax calls). > > The TreeNode isn't sealed, so I thought I could extend it (call the new > > one > > SuperTreeNode) and add a bunch of data to the new node that I need to keep > > track of. But when the TreeNodePopulate event fires and I get the node > > from > > the TreeNodeEventArgs, it isn't the same node I put in the tree, its an > > actual TreeNode that just looks like my SuperTreeNode, minus all my > > important > > data. Is there any way to change this behavior? I suspect the problem > > lies > > in the javascript behind the call, so that leads me to believe that I > > don't > > have much chance to get around it. Would it be better to put my data in a > > custom HierarchicalDataSource? And if I do this, will I be able to figure > > out which of the datasource's nodes I need to fill from > > TreeNodeEventArgs.Node? TIA. > > >
MyGridView cause "Columes" lose the intellisense in VS2005 IDE!
CompositeControl and Toolbox A socket operation was attempted to an unreachable network ID of web control changed Can i Make a Month Column Display May instead of 5 How to get dynamic control's value after postback? Custom Panel How to upload files to a remote webserver using FileUpload ? MetaBuilders DualList control does not work in 2.0 Input Table with Variable number of Rows |
|||||||||||||||||||||||