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

Column MaxWidth not honored.

3 Answers 211 Views
GridView
This is a migrated thread and some comments may be shown as answers.
JustinWong
Top achievements
Rank 1
JustinWong asked on 02 May 2010, 07:04 PM
Hi:

I have a grid with several columns. Every column except the second one has a MaxWith specified (for the second one, the MaxWidth = 0). The grid is inside a TableLayoutPanel.

When the form first load, the size of the columns look as they should, but when the form is re-sized (maximized), the size of ALL the columns gets re-sized to a width that is LARGER than specified in the column's) MaxWidth property.

This is undesirable, since the last couple columns are command columns with MaxWidth specified to 120. But when the form is resize, those columns are now more like 300 in width - very ugly looking.  Is there anyway to fix that?

Also, is there anyway for you folks to add additional filters when searching for forum posts. There are SO MANY outdated post (for example, with I searched for "column Maxwidth", all the posts returned are at least 18 months old and do not apply to the newest version anymore). It amounts to a BIG waste of time.  At the very least, there should be a feature that allows the order of post from the newest to the oldest.  That should not be a difficult feature to implement. Can you folks do that?

Thanks

3 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 04 May 2010, 06:50 PM
Hi JustinWong,

Let me start be answering the search question - we have taken steps to improve the situation by utilizing a new search appliance, and you should see improvements within the next 2-3 weeks. If you still continue to experience problems after that time frame, please send us your feedback so that we can optimize things further.

As to the GridView question, I didn't manage to reproduce the issue locally. I used the following code:

this.radGridView.DataSource = employeesDataSource;
this.radGridView.Columns["ID"].MaxWidth = 10;
//this.radGridView.Columns["Name"].MaxWidth = 50;
this.radGridView.Columns["CompanyName"].MaxWidth = 20;
this.radGridView.Columns["HireDate"].MaxWidth = 20;
this.radGridView.Columns["Random"].MaxWidth = 20;
this.radGridView.Columns["Bool"].MaxWidth = 10;
this.radGridView.Columns["FireDate"].MaxWidth = 10;

Could you describe how you achieve the problem? Can you send to us a code snippet of grid initialization? Please, note that if you are using the grid with AutoSizeColumnsMode set to GridViewAutoSizeColumnsMode.Fill the last column will always exceed its max width.

Greetings,
Svett
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
JustinWong
Top achievements
Rank 1
answered on 04 May 2010, 07:21 PM
I am indeed using the .Fill property.  So, that accounts for the issue.  Is there no way to get around this tough?  I guess I'm not understaning why it always has to be the last column that gets resize, and not the columns that have MaxWidth set to 0.  To me, that would be far more logical.  Afterall, isn't the purpuse of the MaxWidth property to limit how width a column can get no matter what? By allow the last column to grow beyond its MaxWidth property, I don't know, it seems like a bug to me. .

Justin
0
Svett
Telerik team
answered on 05 May 2010, 11:43 AM
Hello JustinWong,

This is not a issue, although your forum post raises a question about that. This is the presented behavior, when you are using GridViewAutoSizeColumnsMode.Fill. We will consider the right behavior and we will choose the right one in one of the next versions. We welcome any other suggestions or recommendation about RadGridView.

Regards,
Svett
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
JustinWong
Top achievements
Rank 1
Answers by
Svett
Telerik team
JustinWong
Top achievements
Rank 1
Share this question
or