Telerik Forums
UI for WPF Forum
0 answers
26 views

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

Andreea
Top achievements
Rank 1
Iron
 asked on 16 Jan 2024
1 answer
147 views

I've used RadGrid and inside that I have one listview with expander control. It is working fine and Expander also expanding and collapsing fine.

But only one issue I have is, when I expanded the Expander and try to scroll down the RadGrid, Expander collapsing every time, it is not retaining it's previous expand state.

I could overcome this by disabling the Virtualization on RadGrid but in that case RadGrid taking long time to load/render.

 

Any help would be appreciated.

Thanks,

Stenly
Telerik team
 updated answer on 02 Mar 2023
1 answer
113 views

Hi,

I have a list of RadExpander, inside every Radexpander there is a Radgridview. When  I expand, expander height grow over the size of window and a scroll bar appears in expander control itself.
I would like that expander doesn't grow over the window and the scroll bar appears in the gridview. I could achieve this behaviour setting maxheight in gridview, but I don't want to limit the height of grid.In first attachment the situation when maxheight is not set, in the second with maxheight set, I would achieve the second situation but without setting maxheight.

Thank you

Luigi

 

Below it is the xaml as appears in LiveVisualTree: I think that the real one it is too much complex to understand the situation quickly.


<Grid x:Uid="Grid_1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<t:RadDocking x:Name="radDocking1"
                            RetainPaneSizeMode="DockingAndFloating"
                            CanAutoHideAreaExceedScreen="True"
                            Grid.Row="1" Margin="0 0 0 10"                            
                            BorderThickness="0"
CloseButtonPosition="InPane"
                            Padding="0"
  Close="radDocking1_Close"
  PaneStateChange="radDocking1_PaneStateChange">
<t:RadSplitContainer 
MinWidth="310"
MaxWidth="600" t:DockingPanel.InitialSize="260,150"
                    Name="RightContainer" InitialPosition="DockedRight">
<t:RadPaneGroup >
<t:RadPane>
<t:RadPanelBar 
HorizontalContentAlignment="Stretch"
ExpandMode="Multiple" Name="PanelBarCursor"
t:StyleManager.Theme="Office_Blue"
ScrollViewer.VerticalScrollBarVisibility="Visible">
<t:RadPanelBarItem 
VerticalAlignment="Top"
HorizontalContentAlignment="Left"
Header="{DynamicResource CursoriAssociati}">
<StackPanel>
<t:RadListBox ItemsSource="{Binding TabCursori.Cursori}" 
  SelectionMode="Single"
  Loaded="RadListBox_Loaded"
  SelectedItem="{Binding TabCursori.SelectedCursor}">
<t:RadExpander t:AnimationManager.IsAnimationEnabled="false" IsExpanded="{Binding IsExpanded, Mode=TwoWay}">
<t:RadExpander.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<t:RadGridView 
MaxHeight="250"
ItemsSource="{Binding PositionsY}"
CanUserDeleteRows="False"
CanUserInsertRows="False"
RowIndicatorVisibility="Collapsed"
AutoGenerateColumns="False"
ShowColumnHeaders="False"
ShowColumnFooters="False"
ShowGroupPanel="False"
ShowScrollPositionIndicator="False"
ShowSearchPanel="False"
SelectedItem="{Binding 
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=t:RadDocking},
Path=DataContext.TabCursori.PositionHilight}"
   IsReadOnly="True">
<t:RadGridView.Resources>
<Style TargetType="t:GridViewRow">
<Setter Property="SelectedBackground" Value="Bisque"/>
</Style>
</t:RadGridView.Resources>
<t:RadGridView.Columns>
<t:GridViewDataColumn DataMemberBinding="{Binding ParameterName}" Width="100"/>
<t:GridViewDataColumn DataMemberBinding="{Binding ParameterValue, StringFormat=N1}" Width="80"/>
</t:RadGridView.Columns>
</t:RadGridView>
<!--<TextBlock Text="{Binding Internal.PositionY, StringFormat={}{0:F4}}"
   Visibility="{Binding PositionYVisibility, Converter={StaticResource BoolToVis}}"/>-->
</Grid>
</t:RadExpander.Content>
</t:RadExpander>
</t:RadPanelBarItem >
</t:RadPanelBar>
</t:RadPane>
</t:RadSplitContainer >
</t:RadDocking>
</grid>
Martin Ivanov
Telerik team
 answered on 10 Feb 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?