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

No Horizontal scrollbar with UseStaticHeaders

3 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Veteran
Al asked on 20 Oct 2015, 02:06 PM

Hi,

With my grid def below, the vertical scroll bars work fine but I never get a horizontal scrollbar. It appears to not adhere to my HeaderStyle-Width and sizes the columns to fit width.

 

<telerik:RadGrid ID="grd1" runat="server"
    OnNeedDataSource="grd1_NeedDataSource"
    OnPreRender="grd1_PreRender"
    OnSelectedIndexChanged="grdx_SelectedIndexChanged"
    AllowPaging="true" PageSize="5" Height="300px" Width="500px"
    AutoGenerateColumns="false">
    <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true"
        Scrolling-AllowScroll="true"
        Scrolling-UseStaticHeaders="true">
        <Selecting AllowRowSelect="true"></Selecting>
    </ClientSettings>
    <MasterTableView DataKeyNames="ID" TableLayout="Fixed">
        <Columns>
            <telerik:GridBoundColumn UniqueName="ID" DataField="ID" Display="false" HeaderStyle-Width="10" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="User" DataField="ChangeUser" HeaderStyle-Width="50" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="AD_Path_Name" DataField="ADName" HeaderStyle-Width="50" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Start" DataField="StartDate" DataType="System.DateTime" HeaderStyle-Width="60" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="End" DataField="EndDate" DataType="System.DateTime" HeaderStyle-Width="60" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Total" DataField="TotalCount" DataType="System.Int32" HeaderStyle-Width="30" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Errors" DataField="ErrorCount" DataType="System.Int32" HeaderStyle-Width="30" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Source" DataField="Source" HeaderStyle-Width="100" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="AD_Path" DataField="ADPath"  HeaderStyle-Width="100"></telerik:GridBoundColumn>
        </Columns
    </MasterTableView>
</telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 20 Oct 2015, 02:12 PM
Hello,

In order horizontal scroll to appear all columns must have explicit pixel widths and their sum must exceed the Grid width.

Regards,
Pavlina
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Al
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 21 Oct 2015, 01:32 PM

Hi Pavlina,

Sorry to post on this thread again but I just noticed something - setting a pixel value to header style width above works fine but then when enabling filtering (AllowFilteringByColumn="true") the filter boxes are cut off - it appears that the filter box does not adhere to the header width property?

0
Accepted
Pavlina
Telerik team
answered on 22 Oct 2015, 02:40 PM
Hi,
 
In case you would like to set the width for the filter control you can use the FilterControlWidth property of the corresponding grid column to define the width dimension of the filter input.

Regards,
Pavlina
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Pavlina
Telerik team
Al
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or