This is a migrated thread and some comments may be shown as answers.

NodeDataBound event does not fire

0 Answers 97 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 10 Feb 2009, 12:58 PM
When your TreeView uses data binding the NodeDataBound event will not fire unless your 

DataFieldParentID column has a null value. I found this when binding to custom objects; in my application in most cases the top most parent had a null value in the DataFileParentID column. Because it was a custom object (composite object) In rare cases my object was returning a zero length string as parent. This was interpeted as being not a valid parent by TreeView and therefore it wasn't consdered for the root, and therefore, the NodeDataBound event wouldn't fire.

Another clear indicator that this problem is occuring is when the TreeView is displayed on the page as empty.

Hope this helps others as my searches here didn't provide any insight into why the event wasn't firing.

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Jay
Top achievements
Rank 1
Share this question
or