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

[Solved] Auto-sizing RadGridView to show all columns

1 Answer 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Josh
Top achievements
Rank 1
Josh asked on 01 Mar 2011, 05:12 PM
Hi, is it possible to have a RadGridView auto-size its width to show all columns it contains?  I have found that setting Width=Auto almost makes this work (when enough size is given, then RadGridView autosizes itself properly).  However, when the container is smaller the RadGridView is resizing itself to be smaller and adding a scrollbar.  I know it sounds weird, but right now i'd prefer that it remain at its full auto-size and get clipped by its parent.  Is this possible?

Thanks!

Josh

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 07 Mar 2011, 10:49 AM
Hi Josh,

You require RadGridView to get clipped by its parent container, when there is not enough space provided to show all of its columns (not to visualize scrollbars), am I right ? Placing the RadGridView in a Grid, setting its Width to Auto and modifying ScrollViewer's attached properties VerticalScrollBarVisibility and HorizontalScrollBarVisibility to Disabled may do the work in your case.  


Regards,
Ivan Ivanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Josh
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or