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

AutoSize columns in Fill mode with a fill weight

1 Answer 168 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jaap
Top achievements
Rank 2
Jaap asked on 03 Jul 2013, 12:25 PM
Is there a way to achieve the following:
I want to have a grid with AutoSizeColumnsMode set to Fill, but I want for example one column twice the width of the others.
E.g. I have 2 column. The first should take 1/3 of the space, the second 2/3.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 05 Jul 2013, 02:00 PM
Hi Jaap,

Thank you for writing.

The AutoSizeColumnsMode functionality will calculate the sizes of the columns as proportion of their Widths i.e. if in a grid with two columns we set the following values:
radGridView1.Columns[0].Width = 10;
radGridView1.Columns[1].Width = 20;

the first column will take 1/3 of the grid size and the second will take the remaining 2/3.

I hope this will be useful. Should you have further questions, I would be glad to help.

  
Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Jaap
Top achievements
Rank 2
Answers by
Dimitar
Telerik team
Share this question
or