Gridview autosizemode Fill with horizontal scrollbar

3 posts, 0 answers
  1. Gabriele
    Gabriele avatar
    14 posts
    Member since:
    Oct 2010

    Posted 21 Mar 2011 Link to this post


    RadControls version


    .NET version

     3.5 SP1

    Visual Studio version


    programming language

     C# and VB


    I needed to have the gridview automatically auto sizing automatically to fill the entire space with most columns having fixed width and using one of the columns, usually the one that has the largest content to fill the rest of the empty space. Then the most important part is that the same variable width column, would have a minimum width so when the screen resolution is not enough to run the full size grid in will automatically change its behavior and show the horizontal scroll bar.

    This sample project shows exactly that.

    First set the width of the variable size column to the maximum, I used the radgrid width.

    Then add the SizeChanged event to show/hide the scrollbar accordingly.

    I hope this is helpfull to somebody.


  2. Stefan
    Stefan avatar
    2891 posts

    Posted 24 Mar 2011 Link to this post

    Hello Gabriele,

    Thank you for sharing your solution with the community. I have added also VB version of your project to the same solution.

    I have updated your Telerik points for your efforts.

    Kind regards,
    the Telerik team
    FERNANDO avatar
    1 posts
    Member since:
    Jun 2013

    Posted 26 Jun 2013 Link to this post

    Hello !

    thank you for your solution. Your work is simple and fast.

    Thank you very much.
Back to Top