2.0 TreeNode

W

William Sullivan

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.
 
T

Teemu Keiski

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?
 
W

William Sullivan

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top