RadTreeListView scroll problem

0 Answers 22 Views
Diagram Expander GridView TreeListView TreeView
Andreea
Top achievements
Rank 1
Iron
Andreea asked on 16 Jan 2024, 03:37 PM

Hi,

I am using <telerik:RadTreeListView> and the scroll functionality does not work. this is how my code looks like:

<UserControl x:Class="WISN.Windows.Survey.FacilityStaffControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:vm="clr-namespace:WISN.Windows.Survey.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <telerik:RadTreeListView x:Name="stufftreeListView" AutoGenerateColumns="False"
                                 AutoExpandItems="True" GroupRenderMode="Flat" CanUserDeleteRows="False"
                                 ItemsSource="{Binding AllStaffByType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged }">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding StaffCategories,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></telerik:TreeListViewTableDefinition>
            </telerik:RadTreeListView.ChildTableDefinitions>

            <telerik:RadTreeListView.Columns>
                <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected}" AutoSelectOnEdit="True" EditTriggers="CellClick">
                    <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding CustomCommandCommand}" EventName="MouseLeftButtonDown" />
                    </telerik:EventToCommandBehavior.EventBindings>
                </telerik:GridViewCheckBoxColumn>
                <telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Name}" Header="Stuff"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding AnnualSalary}" Header="Annual Salary"></telerik:GridViewDataColumn>
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
</UserControl>

 

I really do not know how to fix it.

Thanks

Stenly
Telerik team
commented on 19 Jan 2024, 01:33 PM

Hello Andreea,

The scrolling functionality will be disabled if the UserControl that hosts the RadTreeListView control is placed in a panel that will measure it with infinity. Some scenarios where this can be present if it is put into a ScrollViewer, a StackPanel, or a Grid's Grid.Row/Grid.Column where the Height/Width property is set to Auto.

With this being said, could you double-check if the above-mentioned scenario is present on your end? If not, could you share a sample project that showcases this behavior?

Andreea
Top achievements
Rank 1
Iron
commented on 07 Feb 2024, 02:41 PM

The only think that I found that worked was MaxHeight="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}. 

But thank you for your response.

No answers yet. Maybe you can help?

Tags
Diagram Expander GridView TreeListView TreeView
Asked by
Andreea
Top achievements
Rank 1
Iron
Share this question
or