wsick/Fayde

TreeView Control Getting Error On Re-Feed

Closed this issue · 6 comments

Hi,

I am using TreeView. I bind a Collection with Itemsource. On first time I feed thatCollection and working fine but when I re-feed that collection than Treeview give's below error.

treeview bug

----------------------TreeView.ts >> CheckForSelectedDescendents (item: TreeViewItem)

Unable to get property 'getEnumerator' of undefined or null reference

In both case getting error:

  1. Collection clear on rebind.
  2. Collection declare new on rebind.

What is CriteriaItem? I need some context on how it is being used as a container.
Does that inherit from TreeViewItem?

Hi,

CriteriaItem Is a ViewModel Class and that class not inherit with TreeViewItem. Not ViewModel if we use normal Class Collection than this problem occur.

CriteriaItem being a container looks suspicious. What does your view xaml look like?

When we binds multi level collection (more than one level) in treeview, and after that if we clear collection or change the source collection with another collection then treeview throws this error.

Hi,

Sample of Source code has been available on below link:
https://www.dropbox.com/s/5gwcxtzza04qe0q/TreeViewIssue.rar?dl=0

First Time TreeView Load but on another time application crash.