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

How to set the last column to Fill

2 Answers 874 Views
GridView
This is a migrated thread and some comments may be shown as answers.
hon
Top achievements
Rank 1
hon asked on 04 Sep 2010, 09:12 AM

DataGridView :

Set the AutoSizeMode property of the last column to Fill and use other sizing options for the other columns. If the other columns use too much of the available space, set the MinimumWidth property of the last column.


http://msdn.microsoft.com/en-us/library/74b2wakt(v=VS.80).aspx

RadGridView :

How to set the last column to Fill?

2 Answers, 1 is accepted

Sort by
0
Deborah
Top achievements
Rank 1
answered on 22 Sep 2010, 09:00 PM
I don't have an AutoSizeMode on the column of a Telerik GridView control?

Is there another way to accomplish this?
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 23 Sep 2010, 09:18 PM
Hello guys,

There is no way of setting fill to a column, the fill property is on the MasterTemplate, just like (radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;), and afer doing this you can adjust the size of your other columns acording to your needs.

A very helpful property that can be used to automattically adjust the size of the columns based on the content is BestFitColumns which can be accessed either from MasterTemplate or from the grid itself (radGridView1.BestFitColumns();) 

Also, if you would like to know more about the way the behavior of the telerik grid view, columns in particular this article will give you some insight,  RadGridView for Winforms, Columns Documentation. You will there this information and more.

Hope this helps,
Best Regards,
Emanuel Varga
Tags
GridView
Asked by
hon
Top achievements
Rank 1
Answers by
Deborah
Top achievements
Rank 1
Emanuel Varga
Top achievements
Rank 1
Share this question
or