wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

TreeView Control Getting Error On Re-Feed #228

Closed JigsSodvadiya closed 3 years ago

JigsSodvadiya commented 8 years ago

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

JigsSodvadiya commented 8 years ago

In both case getting error: 1) Collection clear on rebind. 2) Collection declare new on rebind.

BSick7 commented 8 years ago

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

JigsSodvadiya commented 8 years ago

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.

BSick7 commented 8 years ago

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

deepaksm1 commented 8 years ago

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.

JigsSodvadiya commented 8 years ago

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.