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

resizeToFit(), resizeColumn() and HeaderStyle.Width incompatible?

4 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 20 Dec 2013, 09:47 PM
Hello,

I am working on a grid with some columns have the width automatically adjusted, some others adjusted by resizeToFit() and some other the width is fixed by HeaderStyle.Width.

If there is a column re sized by  resizeToFit(), all the following columns' width with HeaderStyle.Width are not respecting this parameter. The columns before the one re sized to fit work well.

Also if I use resizeToFit() and resizeColumn(index,width) (not using HeaderStyle.Width in this case), only resizeColumn is applied (placed after resizeToFit() in the script).

Could please explain how can they all get along together?
Thank you
Gregory


4 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 23 Dec 2013, 04:27 PM
I would like to add another behavior that I just noticed.
Let's take an example with a grid with 10 columns in which some columns are defined with HeaderStyle.Width. The grid allows the users to resize columns. If the user re sizes a column, all the columns coming after lose their initial width.

I am guessing it is a normal behavior. Is there any documentation about all of this please?

Thank you
Gregory

0
Vasil
Telerik team
answered on 26 Dec 2013, 12:59 PM
Hi Greg,

If you want to resize column, without affecting the rest columns then the whole width of the grid will be affected. You could achieve this by setting ClientSettings -> Resizing -> ResizeGridOnColumnResize = true.

Additionally see this demo and the related resources to the demo for more information:
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-row-resize-reorder/defaultcs.aspx

Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Greg
Top achievements
Rank 1
answered on 26 Dec 2013, 02:07 PM
Hello Vasil,

Thank you for you answer.

In this example:
+-----------------+-----------+-----------------+-----------+
|            A         |       B      |           C         |      D       |
+-----------------+-----------+-----------------+-----------+

The grid is adjusted to the screen width and expands automatically. Columns B and C are fixed to 50px with HeaderStyle.Width. A and C are automatically adjusted.

Is it possible to have the column C adjusting automatically when the user adjusts the column A? since B and C have been defined ?

I am guessing no according to your previous answer, I just wanted to confirm.

Thank you again



0
Antonio Stoilkov
Telerik team
answered on 02 Jan 2014, 09:08 AM
Hi Greg,

You are correct in your observations. There is no way to automatically adjust the C column white the A column adjusts. If you have any additional questions related to RadControls please do not hesitate to contact us again.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
General Discussions
Asked by
Greg
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Vasil
Telerik team
Antonio Stoilkov
Telerik team
Share this question
or