Horizontal scroll bar issue

2 posts, 0 answers
  1. Adesh
    Adesh avatar
    4 posts
    Member since:
    Jul 2011

    Posted 22 Aug 2013 Link to this post


    I have implemented a radgrid that will hold the records from a database table say employee table.
    I have kept the width of grid as say 420 px and wanted to grow the grid downwards as the new employee names are added.
    So no vertical scroll bar required.
    css that helped me  to acheive this -> 
     .MyGridClass .rgDataDiv
            height: auto !important;

    But when say the employee name is more than the grid width than its clipped  But all i want that whenever any empname that is bigger  THERE SHOULD BE ONE HORIZONTAL SCROLL BAR.

    so how to achieve this ???

    Please help !!

    With Regards
  2. Venelin
    Venelin avatar
    352 posts

    Posted 27 Aug 2013 Link to this post

    Hi Adesh,

    In order to achieve only horizontal scroll bar and RadGrid resizes by height depending on records height you can set the following client settings:


        <Scrolling AllowScroll="true" ScrollHeight=""/>

    Here, the ScrollHeight  property is set to an empty string and that's all you need to do.

    You can also refer to these help topics for more information:

    1. Height vs. ScrollHeight

    2. Resizing Grid with Scrolling when Data is Less Than Scroll Height

    Please find attached a sample project that illustrates the approach.

    I hope this helps.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top