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

[Solved] Column autosize

2 Answers 192 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 May 2009, 08:44 AM
Dear all,
is possible to specify something like "best-fit" - autosize for column width?

We are searching a new grid component and this is fundamental question for us.

Thank you for answer.

Best regards,
  David Mensik.

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 28 May 2009, 09:25 AM
Hello David,

You can achieve the scenario you require with RadGrid by setting the TableLayout property of the GridTableView to Auto whihc allows you to automatically adjust your column widths to widest content in the column cells. You can refer to the following help link which explains about the different values that can be set for the TableLayout property of the grid:
TableLayout Property

Let me know if this helps.
Princy.
0
Randy
Top achievements
Rank 1
answered on 18 Sep 2009, 07:11 PM
I'm looking for something similar too.  I don't want to use the Fixed layout because we need to grid to stretch as the user resizes their columns. We want to give the user a way to click a button that will shrink the grid back down to a reasonable size based on the data being displayed.  So if they stretch a bunch of columns and the grid gets stretched (good), we want a way for them to basically shrink it down so all data is displayed and not clipped.   Not neccessarily to 100%.  It might be more.  It might be less. It all depends on the data. 

Randy
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Randy
Top achievements
Rank 1
Share this question
or