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}"
                        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>
  2. Boris
    Admin
    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? 

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