Hello,
I've a strange issue with a treelistview.
Only when the scrollbar is at the bottom, add a new item is not "detected" (works fine 1 /2 times and break after..., scroll to another position and add a new item works fine).
I can't reproduce the issue with an external basic "sample" , (and the issue is reproduced only for one of the two instance I have)
Basically is something like this:
public class ViewModel
{
ObservableCollection<ItemToAdd> Items;
void OnNewItems(ICollection<ItemToAdd> newitems)
{
Foreach(item in newitems)
{
var parentNode = Items.where( x => x = newitem)
parentNode?.Children.Add(item)
}
}
}
publicclassItemToAdd
{
ObservableCollection <ItemToAdd> Childrens
}<telerik:RadTreeListView x:Name="Tree"
ItemsSource="{Binding Items}"
CanUserFreezeColumns="False"
RowIndicatorVisibility="Collapsed"
ColumnWidth="auto"
AutoGenerateColumns="False"
IsDragDropEnabled="True"
IsDropPreviewLineEnabled="False"
ShowColumnHeaders="True"
RowStyle="{StaticResource RowStyle}"
SelectionMode="Extended"
GridLinesVisibility="None"
IsExpandedBinding="{Binding IsExpandedInTree, Mode=TwoWay}"">
...
<telerik:RadTreeListView.ChildTableDefinitions>
<telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
</telerik:RadTreeListView.ChildTableDefinitions>
</telerik:RadTreeListView>Here my tree is like this:
> Main node
> Sub Node level 1
>Sub Node level 2
>Sub Node level 2
> Sub Node level 1
>Sub Node level 2
>Sub Node level 2
> Sub Node level 1
>Sub Node level 2
>Sub Node level 2It seems that disabling Virtualization solve the issue but I don't want to do this.
Any idea?
Thanks!!
hi,
thanks for your feedback!
we finally found that it is the reordering of our nodes after adding a child that is the problem.