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

Gridview BestFitColumns

4 Answers 138 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 21 Oct 2009, 10:46 AM

I use an unbound radgridview. After initialization of the columns i have an empty radgridview.

When i now call radgridview1.MasterGridViewTemplate.BestFitColumns( );

then the column header is ignored in the calculation of the best size for the columns and all columns are shrunken to a few pixels.

Kind Regards,

Ramius 

4 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 21 Oct 2009, 11:23 AM
Hi Ramius,

When there are no rows in RadGridView it uses the header text to determine the optimal column width. If it is empty, the column will shrink to its minimal width. Please, could you confirm that this is the case? If not, send us a small application that reproduces the issue. This will help us to locate it and address it for the next release.

I am looking forward to your reply.

Kind regards,
Jack
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
Ramius
Top achievements
Rank 1
answered on 21 Oct 2009, 12:44 PM

Hello Jack,

no i can't confirm this. 

When i expand a shrunken column i can see the column header text.

I will send you an example.

Kind regeards,

Ramius

0
Kirk Couser
Top achievements
Rank 1
answered on 21 Oct 2009, 06:48 PM
I had switch out this line of code:

gridFileVersions.MasterGridViewTemplate.BestFitColumns();

with this one:

gridFileVersions.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

in order for my columns to autosized after upgrading from the Q2 2009 release to the Q3 2009 Beta.



0
Jack
Telerik team
answered on 22 Oct 2009, 10:21 AM
Hi Kirk,

Thank you for your feedback. Yes, I confirm that the issue exists. Currently we are working on it and it will be addressed in the final release(beginning of November). If you have any other questions, don't hesitate to write back.

Greetings,
Jack
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
General Discussions
Asked by
Ramius
Top achievements
Rank 1
Answers by
Jack
Telerik team
Ramius
Top achievements
Rank 1
Kirk Couser
Top achievements
Rank 1
Share this question
or