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

How to automatically resize a column ?

5 Answers 167 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas LEBRUN
Top achievements
Rank 1
Thomas LEBRUN asked on 22 Oct 2009, 04:09 PM
Hi,

I would like to know how I can automatically resize a column (simulate a double-clic on the grid column separator) so the content is not truncated.

I've found nothing to do this: is it possible ?


Thanks !

5 Answers, 1 is accepted

Sort by
0
Thomas LEBRUN
Top achievements
Rank 1
answered on 22 Oct 2009, 08:37 PM
Hi,

Nobody got an idea ? :(


Thanks !
0
Hristo
Telerik team
answered on 23 Oct 2009, 06:49 AM
Hi Thomas LEBRUN,

Double Clicking on the thumb that is used to resize the column will make it auto size.
The thumb is between two columns.
Also in Q3 beta 2 release you can set radGridView.Columns[0].Width = GridViewLength.Auto
It is the same as double clicking the resize thumb.

Kind regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Thomas LEBRUN
Top achievements
Rank 1
answered on 23 Oct 2009, 07:24 AM
Hi Hristo;

Using GridLength.Auto does what I need: thanks !

Thomas
0
Sam Smith
Top achievements
Rank 1
answered on 03 Dec 2009, 10:32 PM
When I try to double click on what I think is the thumb in between the two columns I don't get the auto size functionality that I'm expecting.  Rather, I get a slight movement on the first click (resize), then I get a sort on the column since the with of the column changed on the first click, my mouse is now on the column header rather than in the middle.

I experimented on the demo site and had the same results. 
http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx

Please let me know if I'm doing something wrong or if I don't understand something.

Thank you!

(Thanks for the reply - I missed that this is the Silverlight forum, is there an autosize function within the asp.net ajax radgrid?)
0
Vlad
Telerik team
answered on 04 Dec 2009, 07:10 AM
Hello,

This demo is for our ASP.NET AJAX grid - you can check RadGridView for Silverlight demos here:
http://demos.telerik.com/silverlight/#GridView/FirstLook

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Thomas LEBRUN
Top achievements
Rank 1
Answers by
Thomas LEBRUN
Top achievements
Rank 1
Hristo
Telerik team
Sam Smith
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or