One of the following two exceptions occur when the BindingOperations.EnableCollectionSynchronization() is used with the ItemsSource of RadTreeListView:
When using the EnableCollectionSynchronization, the corresponding items control should allow updates of the ItemsSource collection on different threads. This is valid if the requirements to use the EnableCollectionSynchronization method are met.
The exception stack traces are:
InvalidOperationException
at System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion() in /_/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs:line 432
at System.Collections.Generic.List`1.Enumerator.MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs:line 1130
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at Telerik.Windows.Data.EnumerableExtensions.<SelectRecursive>d__15`1.MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at Telerik.Windows.Data.HierarchicalCollectionViewBase.PopulateInternalList(IQueryable view)
at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
at Telerik.Windows.Data.HierarchicalCollectionViewBase.get_InternalCount()
at Telerik.Windows.Data.DataItemCollection.get_Item(Int32 index)
at Telerik.Windows.Controls.GridView.Rows.GetRowItemsAtRange(Int32 startIndex, Int32 endIndex)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize)
NullReferenceException at Telerik.Windows.Data.QueryableCollectionView.InternalGetItemAt(Int32 index) in Telerik.Windows.Data\QueryableCollectionView.cs:line 3081 at Telerik.Windows.Controls.GridView.Rows.GetRowItemsAtRange(Int32 startIndex, Int32 endIndex) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize)
To work this around dispatch the updates of the ItemsSource collection to the main UI thread.
Dispatcher.BeginInvoke(new Action(() =>
{
// add/remove items from the source collection
}));
The horizontal scrollbar of RadTreeListView is displayed even the setup suggest that it should not be. For example, this happens if you have a single column with its Width set to * which means that the RadGridView should span in the available space without the need of displaying a horizontal scrollbar. To recreate this the RowIndicatorVisibility property should be set to Collapsed. Additional to that there should be a hierarchy and the items should be expanded.
To work this around, you can set a fixed Width for the column. If you want this to be dynamic you can calculate the width on SizeChanged of RadTreeListView
By default the AutoExpandItemsAfterFilter property of RadTreeListView is set to True, which means that when you filter the data, the parents of all found child items will be expanded automatically. However, if you call the CollapseAllHierarchyItems method this functionality stops working.
To work this around, you can reset the ItemsSource property instead of using the CollapseAllHierarchyItems.
this
.RadTreeListView.SelectedCells.Clear();
If you move an item from one level to another into the tree, the indent of the corresponding row won't get updated. This is reproducible only if the new parent of the moved item is expanded, while the operation is executed. Usually, this can be reproduced by calling the ExpandHierarchyItem() for the new parent item method just after the moving of the original item. To resolve this you can delay the expanding of the item. Note that the expanding is executed manually by calling the ExpandHierarchyItem() method. So, you can use a dispatcher with a lower DispatcherPriority to delay this. Or alternatively, you can collapse the item before expanding it (using the CollapseHierarchyItem() method).