我有一个RadExpander,在它里面我有一个RadGridView和一个ToggleColumn。问题是当一行内容很大时,如果我尝试向右滚动以查看文本的结尾,则当前行会折叠。这些行是自动生成的,以防万一。
提前致谢..
我有一个RadExpander,在它里面我有一个RadGridView和一个ToggleColumn。问题是当一行内容很大时,如果我尝试向右滚动以查看文本的结尾,则当前行会折叠。这些行是自动生成的,以防万一。
提前致谢..
好吧,这是解决方案,问题与我使用的切换列的类型有关..
<UserControl x:Class="RadGridView_SL5_AR_34.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:my="clr-namespace:RadGridView_SL5_AR_34"
mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="700">
<UserControl.Resources>
<my:MyViewModel x:Key="MyViewModel" />
</UserControl.Resources>
<ScrollViewer VerticalScrollBarVisibility="Visible" DataContext="{StaticResource MyViewModel}">
<Grid Background="#FFB9B9B9">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<telerik:RadExpander x:Name="expanderRunningReqs"
IsExpanded="False"
VerticalContentAlignment="Top"
telerik:AnimationManager.IsAnimationEnabled="True"
Grid.Row="1">
<telerik:RadExpander.Header>
<StackPanel Orientation="Horizontal"
Grid.Column="1"
Grid.Row="0">
<TextBlock Text="Clubs"
Margin="5" />
</StackPanel>
</telerik:RadExpander.Header>
<telerik:RadExpander.Content>
<telerik:RadGridView x:Name="grdClubs"
Margin="3"
ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
IsReadOnly="True"
MaxHeight="300"
HorizontalAlignment="Stretch"
AutoGenerateColumns="False"
CanUserFreezeColumns="False"
ItemsSource="{Binding Clubs}">
<telerik:RadGridView.Columns>
<telerik:GridViewToggleRowDetailsColumn />
<telerik:GridViewDataColumn Header="Name"
DataMemberBinding="{Binding Name}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
Header="Established"
DataFormatString="{} {0:dd, MMM, yyyy H:mm}" />
<telerik:GridViewDataColumn Header="StadiumCapacity"
DataMemberBinding="{Binding StadiumCapacity}" />
</telerik:RadGridView.Columns>
<telerik:RadGridView.RowDetailsTemplate>
<DataTemplate >
<telerik:RadGridView x:Name="grdDetails"
ItemsSource="{Binding Players}"
ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
IsReadOnly="True"
MaxHeight="200"
HorizontalAlignment="Stretch"
AutoGenerateColumns="False"
CanUserFreezeColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
Header="Name" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Number}"
Header="Number" />
<telerik:GridViewDataColumn Header="Country"
DataMemberBinding="{Binding Country}"
MinWidth="150" />
<telerik:GridViewDataColumn Header="Position"
DataMemberBinding="{Binding Position}"
MinWidth="500" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>
</telerik:RadGridView>
</telerik:RadExpander.Content>
</telerik:RadExpander>
</Grid>
</ScrollViewer>
</UserControl>