Rank: Member Groups: Member
Joined: 3/4/2008 Posts: 14
|
we are having problems when trying to sub-class the treeview.. we want to add some properites. Is this possible? maybe it's an asp.net issue.
Specifically .. I can subclass a tree Node, but when I need to iterate over a collection of treeNodes I can't pass in the base class to the method...
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Craig,
You won't be able to do that. The reason is that when the TreeView tries to reconstruct the TreeNodes from view state when the page is posted back, it has no knowledge about your subclassed TreeNode type.
If you wish to store anything in the TreeNode, you can store some kind of key information in the TreeNode's Value property as a string. That way it can always be corrected saved/restored. You will then rely on this key information to restore other information.
Thanks
|