Is there a way to wrap text in a column header?

3 posts, 0 answers
  1. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 05 Aug 2010 Link to this post

    I have an image column that displays an 18x18 image and the column header text is making the column too wide. It just doesnt look right. But I can wrap the text in the header, it will cut the width of the column in half. Is there a way to do this?

    Thanks in advance...
  2. Jokerwolf
    Jokerwolf avatar
    31 posts
    Member since:
    May 2010

    Posted 06 Aug 2010 Link to this post

    <telerik:GridViewDataColumn DataMemberBinding="{Binding Value}" Width="18">
                        <telerik:GridViewDataColumn.Header>
                            <Border>
                                <TextBlock Text="My value" TextAlignment="Center" TextWrapping="Wrap"/>
                            </Border>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
    Try this.
  3. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 06 Aug 2010 Link to this post

    Hi kilhoffer,

    Use this code,to enable textwrapping in your column's header:
    <telerik:GridViewImageColumn  Width="110"   DataMemberBinding="{Binding URL}" >
                       <telerik:GridViewImageColumn.Header>
                           <TextBlock Text="Image column Image Column Image Column" TextWrapping="Wrap" />
                       </telerik:GridViewImageColumn.Header>
                   </telerik:GridViewImageColumn>

    Sincerely yours,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top