Horizontal ScrollBar Problem in GridVIew

3 posts, 0 answers
  1. Nick
    Nick avatar
    1 posts
    Member since:
    Aug 2012

    Posted 20 Sep 2014 Link to this post

    I am new in Winforms and I try an example with a radGridView to display some columns. What I want is to use the horizontal scroll bar to allow the user to see all the columns that don't fit in the display area of the grid. What it does now is to shrink the last columns to a minimum size and the user must go and try to resize the columns in order to see the last columns of the grid.

    Thank you very much
  2. Stefan
    Stefan avatar
    2908 posts

    Posted 23 Sep 2014 Link to this post

    Hi Nick,

    Thank you for writing.

    RadGridView has a AutoSizeColumnsMode property, which has two options - Fill, which will take the grid's width and divide it by the number of the columns and the will set each column the same size, hence no scroll bars will be show. The other option is None (the default one) and when this is set, if the total columns width exceeds the grid's width, scroll bar is automatically shown.

    Another interesting method for column sizing is the BestFit method of a column or the BestFitColumns method of the grid, which will size all columns on a way to fit their content. 

    More information about these features is available on the following link: http://www.telerik.com/help/winforms/gridview-columns-resizing-columns-programatically.html.

    Let me know how this works for you.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Tofan
    Tofan avatar
    25 posts
    Member since:
    Jun 2010

    Posted 11 Dec 2014 in reply to Stefan Link to this post

    I have the same problem. The Horrizontal Scroll bar doesnt show.
    I used AutoSizeColumnsMode on NONE
    I used MasterTemplate.HorizontalScrollState to AlwaysShow
    I used AutoScroll to True
    The grid view takes data from a database(using a datasource) at the running time. Like dg_stoc_teava.DataSource = oStocTeava; with oStocTeava is a DataTable with data
    I have more enough tables that are always bigger than the grid width
    My VerticalScroll Bar it does show.
    Please help me. Thanks for the time.
Back to Top