treeview
i have a problem with treeview in asp .net.
i derive TreeNode class to MyTreeNode, and add some fields.
then i add MyTreeNode objects to the treeview instead of TreeNode objects.
in the
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
event i use
((MyTreeNode) e.Node.ChildNodes[i]).Kod
but i got the the following error
Unable to cast object of type 'System.Web.UI.WebControls.TreeNode' to type 'MyTreeNode'.
can you help me?
|