views:

269

answers:

2

Hi All,

I am facing a very strange issue. I have a SharePoint webpart that displays an asp.net tree view. It takes tree depth from a drop down. To improve performance of the tree view, i am setting the PopulateOnDemand property to true for the last level of the tree depth.

For example, if i have a total of 10 levels in the data and the user selects tree depth as 3, then the third level data i set PopulateOnDemand to true.

Now comes the strange part. When i click on the + image on the third level, and if there are children under that particular node then call back happens and node gets expanded. But if there no children for that particular node, then click + throws "Input string was not in the correct format" error.

I have made sure that there is no server side error. Some things looks to be fishy when internet explorer is trying to bind construct the expanded node.

Please let me know if any one faced similar issue or the resolution for the same?

Thanks in advance

A: 

Are you using updatepanels w/ ajax 1.0? TreeView is, atleast in AJAX 1.0 are known to not work with updatepanels.

F.Aquino
Hi,No i am not using update panel. However there is another control in the same webpart that is using call back to get data from server.
Faiz
Try changing the NavigateUrl to = "#" or "javascript:void(0)", I had to inherit the TreeNode class to add the OnClick behavior 'return false' (the way I have links do nothing).
F.Aquino
A: 

I changed from asp.net tree view to SharePoint tree view and it seemed to be working. Not sure if that fixed the issue.

Faiz