This is a migrated thread and some comments may be shown as answers.

With Text Wrapping on, Row Height not autosizing

1 Answer 548 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 30 May 2014, 03:44 PM
I'm having problems with row height not auto - sizing with text wrapping on.  When I enter a long string, it will wrap to two lines in the row, but it doesn't display the third row. I would like to row height expand to automatically to display all the text.

Below is the grid XAML code I'm using.

<
telerik:RadGridView Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsSource="{Binding Path=CustomSqlStatus}"
                    AutoGenerateColumns="False"
                    CanUserDeleteRows="False" CanUserInsertRows="False" CanUserSelect="False"
                    UseLayoutRounding="True" CanUserFreezeColumns="False"
                    CanUserReorderColumns="False"
                    CanUserSortColumns="False" Padding="2" ShowGroupPanel="False"
                    IsFilteringAllowed="False" CanUserSortGroups="False"
                    RowIndicatorVisibility="Hidden" MaxColumnWidth="400">
<telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SqlCommandName}"
                                Header="Command Name"
                                HeaderCellStyle="{StaticResource BoldFont}" />
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Comments}"
                                Header="Comment"
                                HeaderCellStyle="{StaticResource BoldFont}" TextWrapping="Wrap" />
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SQL}"
                                Header="Sql"
                                HeaderCellStyle="{StaticResource BoldFont}" TextWrapping="Wrap"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>

1 Answer, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 02 Jun 2014, 12:08 PM
Hello Thomas,

I am not really sure why the TextWrapping property set to Wrap wouldn't work in your case. In order to reproduce the issue from your description I set the RowHeight property of the GridView to a fixed value. However, it seams to be working as intended.

Also, I attached the sample project that I used. Could you please edit it in a way that it reproduces the described behavior? 

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Boris
Telerik team
Share this question
or