With Text Wrapping on, Row Height not autosizing

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    3 posts
    Member since:
    Nov 2013

    Posted 30 May 2014 Link to this post

    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}"
                        CanUserDeleteRows="False" CanUserInsertRows="False" CanUserSelect="False"
                        UseLayoutRounding="True" CanUserFreezeColumns="False"
                        CanUserSortColumns="False" Padding="2" ShowGroupPanel="False"
                        IsFilteringAllowed="False" CanUserSortGroups="False"
                        RowIndicatorVisibility="Hidden" MaxColumnWidth="400">
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SqlCommandName}"
                                    Header="Command Name"
                                    HeaderCellStyle="{StaticResource BoldFont}" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Comments}"
                                    HeaderCellStyle="{StaticResource BoldFont}" TextWrapping="Wrap" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SQL}"
                                    HeaderCellStyle="{StaticResource BoldFont}" TextWrapping="Wrap"/>
  2. Boris
    Boris avatar
    276 posts

    Posted 02 Jun 2014 Link to this post

    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? 

    Boris Penev
    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.
Back to Top