No Horizontal scrollbar with UseStaticHeaders

4 posts, 2 answers
  1. Al
    Al avatar
    221 posts
    Member since:
    Oct 2006

    Posted 20 Oct 2015 Link to this post

    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>

  2. Answer
    Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 20 Oct 2015 Link to this post

    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
  3. Al
    Al avatar
    221 posts
    Member since:
    Oct 2006

    Posted 21 Oct 2015 Link to this post

    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?

  4. Answer
    Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 22 Oct 2015 Link to this post

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