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

How do I align the header text & sorted arrow in 1 row

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jing
Top achievements
Rank 1
jing asked on 26 Aug 2010, 08:06 AM
Hi,

How do I set the Header Text and the Sorted Arrow in the same row rather than 2 row (see attached screenshot for 2row) in the header? It should also stay in 1 row even the column is dragged to a smaller width.

<telerik:RadGrid ID="GridDocument" runat="server" AutoGenerateColumns="False"
    AllowPaging="True" AllowSorting="True" AllowMultiRowSelection="true" 
    Width="100%" Height="345px" OnPageIndexChanged="GridDocument_PageIndexChanged"
    OnSortCommand="GridDocument_SortCommand">
    <PagerStyle AlwaysVisible="true" />
    <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID" TableLayout="Fixed">
        <Columns>
            ...
            <telerik:GridBoundColumn DataField="Version" HeaderText="<nobr>Version</nobr>" UniqueName="Version" DataFormatString="<nobr>{0}</nobr>" SortExpression="Version">
                <HeaderStyle Width="70px" />
                <ItemStyle Width="70px" />
            </telerik:GridBoundColumn>
            ...
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        <Resizing AllowColumnResize="True" EnableRealTimeResize="true" ClipCellContentOnResize="true"></Resizing>
    </ClientSettings>
</telerik:RadGrid>

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 01 Sep 2010, 09:11 AM
Hello Jing,

The expected behavior of the RadGrid sort indicators has always been as the one you are seeing with the current version. RadGrid header labels are by default inline text nodes. If a sort icon must be displayed and the header label occupies two lines, the sort icon will go to the second line.

All the best,
Pavlina
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
Grid
Asked by
jing
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or