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

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

2 Answers 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kilhoffer
Top achievements
Rank 1
kilhoffer asked on 05 Aug 2010, 08:35 PM
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 Answers, 1 is accepted

Sort by
0
Jokerwolf
Top achievements
Rank 1
answered on 06 Aug 2010, 08:58 AM
<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.
0
Vanya Pavlova
Telerik team
answered on 06 Aug 2010, 02:25 PM
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
Tags
GridView
Asked by
kilhoffer
Top achievements
Rank 1
Answers by
Jokerwolf
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Share this question
or