sergo - 2014-03-24

Hi,
I switched my project to 2.7 TreeListView recently and came across the strange behavior. It can be seen in ObjectListViewDemo application.
1.In the DataBoundTree tab expand Nicola Piper branch
2.Scroll down to see the lower part of the treelistview
3.Check the Joshua Piper subitem
4.Notice that Henry Washington became Joshua Piper now and it's checked state is the same. Actually they are the same object now.

After some debugging I found that the method UpdateObject(int index, object modelObject) in TreeListView.cs is given the index of the object found in mapObjectToIndex dictionary and as a result updates Roots object with that index.
When some branch in expanded in TreeListView index in mapObjectToIndex is different from index of the same object in Roots collection and, if I understand it right, that causes the strange behavior.

I resolved that bug by commenting out UpdateObject method call in VirtualObjectListView.RefreshObjects method. I'm not sure if it is ok (I think it is not) but my project works fine so far.

Other than that new version works much better for me.