Hello
I'm using a details template for a row as follows:
Basically, the details template shows a potentially long message in a discussion. Here's the code for the grid using the template:
The problem that I'm having is that if the text is particularly long in the row details view, it won't wrap automatically. Instead it forces a scrollbar at the bottom of the grid and makes the user manually scoll - this isn't my desired behaviour.
Any tips on how to cause the text to wrap correctly?
I'm using a details template for a row as follows:
<DataTemplate x:Key="DiscussionDetailsTemplate"> |
<Grid> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="Auto" /> |
<ColumnDefinition Width="*" /> |
</Grid.ColumnDefinitions> |
<Grid.RowDefinitions> |
<RowDefinition Height="Auto"/> |
</Grid.RowDefinitions> |
<TextBlock Grid.Row="0" Grid.Column="0" Text="Discussion Text: " Margin="12,0,0,0" FontSize="13" FontWeight="Bold" /> |
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding mNotes}" TextWrapping="Wrap" FontSize="13" Margin="12,0,0,0" HorizontalAlignment="Left" /> |
</Grid> |
</DataTemplate> |
Basically, the details template shows a potentially long message in a discussion. Here's the code for the grid using the template:
<telerik:RadGridView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Name="DiscussionListGridView" Style="{DynamicResource DefaultGrid}" |
ItemsSource="{Binding DiscussionList}" SelectedItem="{Binding SelectedDiscussion}" AutoGenerateColumns="False" |
ScrollMode="RealTime" DataLoadMode="Synchronous" CanUserSortColumns="True" |
RowDetailsVisibilityMode="VisibleWhenSelected" RowDetailsTemplate="{StaticResource DiscussionDetailsTemplate}" |
> |
<telerik:RadGridView.Resources> |
<Style TargetType="telerik:RadGridView"> |
<Setter Property="ShowGroupPanel" Value="False"/> |
</Style> |
</telerik:RadGridView.Resources> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn Width="Auto" Header="From" Name="AuthorName" IsReadOnly="True" DataMemberPath="sgAuthorName" |
TextWrapping="Wrap" /> |
<telerik:GridViewDataColumn Width="*" Header="Subject" Name="Subject" IsReadOnly="True" DataMemberPath="sgDescription" |
TextWrapping="Wrap" /> |
<telerik:GridViewDataColumn Width="Auto" DataFormatString="{}{0:dd/MM/yyyy}" Header="Date" Name="StatusDateDue" |
IsReadOnly="True" DataMemberPath="dtDateCreated" TextWrapping="Wrap" /> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |
The problem that I'm having is that if the text is particularly long in the row details view, it won't wrap automatically. Instead it forces a scrollbar at the bottom of the grid and makes the user manually scoll - this isn't my desired behaviour.
Any tips on how to cause the text to wrap correctly?