Unplanned
Last Updated: 18 Oct 2024 15:10 by Martin Ivanov

One of the following two exceptions occur when the BindingOperations.EnableCollectionSynchronization() is used with the ItemsSource of RadTreeListView:

  • System.InvalidOperationException: 'Collection was modified; enumeration operation may not execute.'
  • System.NullReferenceException: 'Object reference not set to an instance of an object.'

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
 }));

Unplanned
Last Updated: 01 May 2024 09:14 by Martin Ivanov

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

 

Unplanned
Last Updated: 08 Dec 2023 15:42 by Martin Ivanov

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.

 

Completed
Last Updated: 07 Nov 2023 06:57 by ADMIN
Release R3 2023 SP1
When the last column's Width is set to "*", applying a filter will resize the columns.

A possible workaround would be the following one:
private void RadTreeListView_Filtering(object sender, Telerik.Windows.Controls.GridView.GridViewFilteringEventArgs e)
{
    var treeListView = sender as RadTreeListView;
    var internalColumns = treeListView.GetType().GetProperty("InternalColumns", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(treeListView);
    internalColumns.GetType().GetProperty("ColumnWidthsCalculationPending", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(internalColumns, true);
}

private void RadTreeListView_Filtered(object sender, Telerik.Windows.Controls.GridView.GridViewFilteredEventArgs e)
{
    Dispatcher.BeginInvoke(new Action(() =>
    {
        var treeListView = sender as RadTreeListView;
        var internalColumns = treeListView.GetType().GetProperty("InternalColumns", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(treeListView);
        internalColumns.GetType().GetProperty("ColumnWidthsCalculationPending", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(internalColumns, false);
    }), System.Windows.Threading.DispatcherPriority.Loaded);
}
Unplanned
Last Updated: 24 Apr 2023 09:01 by Martin Ivanov
The gray background that is shown when you hover an item is not hidden when the pointer leaves the item. That happens when you scroll on a touch device. 

To work this around, you can hide the pointer over background completely. To do this, you can edit the ControlTemplate of RadListView item and remove the Setter from the PointerOver Visual State.
Declined
Last Updated: 29 Nov 2022 14:21 by ADMIN
Performance is degraded when a large number of columns are added dynamically by binding the Columns collection via an attached behavior.
Completed
Last Updated: 13 Oct 2022 11:06 by ADMIN
Release LIB 2022.3.1017 (17 Oct 2022)

If you press Ctrl+Up/Down to change the selection and currency in TreeListView, the CurrentCellChanged event is fired. However, the e.NewCell property of the event arguments is null.

To get the new cell, use the CurrentCellInfo property of RadTreeListView.

private void RadTreeListView_CurrentCellChanged(object sender, GridViewCurrentCellChangedEventArgs e)
{
	var treeListView = (RadTreeListView)sender;
	GridViewCellInfo currentCell = treeListView.CurrentCellInfo;
}

Completed
Last Updated: 12 Oct 2022 12:14 by ADMIN
Release LIB 2022.3.1017 (17 Oct 2022)

An exception is thrown when you try to update the items source of RadTreeListView in an async method.

The following error is observed.
InvalidOperationException: The calling thread cannot access this object because a different thread owns it

To work this around ensure that only the main UI thread updates the item source.

Completed
Last Updated: 29 Aug 2022 07:06 by ADMIN
Release LIB 2022.2.829 (29 August 2022)
Unplanned
Last Updated: 16 Jun 2022 13:26 by Martin Ivanov
Currently, the Shift + click action (when SelectionMode is Extended) selects only the expanded items. Any child items that are in the collapsed items collection of a node won't get selected.

Add a mechanism to allow this type of selection. It can be built-in or some events or method overrides can be introduceds in order to be bale to easily interfere and customize the extended selection.
Declined
Last Updated: 17 May 2022 09:35 by ADMIN

I am using a RadTreeListView with MaterialDesign theme in a Windows WPF application. By default the selected cell is indicated by a grey line at the bottom of the cell. I don't want an indication for the selected cell and used the advise from forum to change the style as follows:


  <Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
    <Setter Property="CurrentBorderBrush" Value="Transparent"/>
  </Style>

This works fine.

But if changing the Windows application with Alt+Tab and then back to my application with Alt+Tab the cell selection (grey underline) is displayed.

Completed
Last Updated: 06 Apr 2022 10:25 by ADMIN
Release LIB 2022.1.406 (06 April 2022)
If the data items of RadTreeListView implement the IEditableObject interface, their EndEdit method is fired on begin cell edit in some cases. This usually happens when you click on a cell to start its editing and previously the focus was on another row (than the clicked one).
Completed
Last Updated: 09 Feb 2022 07:42 by ADMIN
Per the thread at "http://www.telerik.com/forums/isexpandablebinding-requires-user-interaction-with-control-to-take-effect" I have modified the IsExpandedRowBinding sample to recreate the problem. I modified the button to expand and collapse the first row. To reproduce the problem:

1. Expand the first row.
2. Scroll down so the first row is not visible but it's children are visible.
3. Press the button. The expected behavior is the first row should collapse but nothing happens.
4. Scroll up so the first row is visible. The first row collapses.
Unplanned
Last Updated: 09 Dec 2021 09:20 by ADMIN
When dragging and dropping an item, to get the current item's place in the collection you would need to either use the underlying collection bound to the ItemsSource property or get it via reflection. Instead, change the ParentView and RootView properties of the HierarchicalChildCollectionView, to public, to not use the reflection approach. 
Unplanned
Last Updated: 24 Jun 2021 09:44 by ADMIN
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).
Completed
Last Updated: 21 May 2021 06:39 by ADMIN
Release LIB 2021.2.525 (25/05/2021)
When the TreeListView lines are set to a column after a hidden one, they are not positioned correctly.
Unplanned
Last Updated: 09 Nov 2020 14:01 by ADMIN
Created by: Vesa
Comments: 1
Category: TreeListView
Type: Feature Request
3
We have many use cases where we have multiple panels and we want a tree control (TreeListView or TreeView) to control the contents of the other panels based on selection. Because the selection always happens on MouseDown instead of MouseUp it is impossible to drag & drop items from the tree without changing the selection and thus the contents of the other panels.
Completed
Last Updated: 19 Oct 2020 10:22 by ADMIN
Release R3 2020 SP1
Selecting a large number of items through the UI or programatically with the Select method when in Extended SelectionMode leads to a degraded performance. As a workaround the Multiple SelectionMode can be used instead.
Completed
Last Updated: 06 Oct 2020 05:46 by ADMIN
Release LIB 2020.3.1012 (10/12/2020)
When the IsExpandedBinding property is bound to a custom property, and we use it to collapse and expand specific items, the rows inside the control will disappear.
Completed
Last Updated: 27 Jul 2020 10:55 by ADMIN
Release LIB 2020.2.2707
In some scenarios the hierarchy expand button is not visible when the HierarchyColumnIndex and FrozenColumnCount are equal.
1 2 3 4 5