Hi, when you remove a column from the column menu, the remaing cols lose their width. That happens when you explicitly define column width for more than 1 column. You can see an example in http://dojo.telerik.com/AGaQ, taken from http://demos.telerik.com/kendo-ui/grid/column-menu, the only difference is that I set the column witdh for everycolumn and not only the first one.
Thanks.
Thanks.
6 Answers, 1 is accepted
0
Hello Juan Jose,
The observed behavior is caused by invalid column width configuration - all column widths are too small, so they are initially ignored by the browser. When a column is hidden and all other visible columns have widths, the Grid applies a width style to the <table> (which was 100% wide until that moment), so that the widths of the remaining columns do not change. That is the time when the small column widths are actually applied.
Please refer to our documentation fur further details and modify the column widths to implement a valid scenario:
http://docs.telerik.com/kendo-ui/getting-started/web/grid/walkthrough#column-widths
Regards,
Dimo
Telerik
The observed behavior is caused by invalid column width configuration - all column widths are too small, so they are initially ignored by the browser. When a column is hidden and all other visible columns have widths, the Grid applies a width style to the <table> (which was 100% wide until that moment), so that the widths of the remaining columns do not change. That is the time when the small column widths are actually applied.
Please refer to our documentation fur further details and modify the column widths to implement a valid scenario:
http://docs.telerik.com/kendo-ui/getting-started/web/grid/walkthrough#column-widths
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Fernando
Top achievements
Rank 1
answered on 20 Aug 2014, 08:25 AM
Hi, first of all thanks for the answer, i tried with percents and it works but not properly. If i resize at least two columns, when i'm resizing the second one, the first column resized changes his size on his own.
Then i tried with all the columns with specified width in pixels but one and it works properly.
There is only one more issue, when i resize columns and the total of all the widths in pixels is greater than the original size, i get overflow by the right and a scrollbar shows up. I wish to 'lock' the size of the grid and when i enlarge a column, the nearby column shrinks, as if the first column take the place of the second one.
Is there any way to do that?
Thanks.
Then i tried with all the columns with specified width in pixels but one and it works properly.
There is only one more issue, when i resize columns and the total of all the widths in pixels is greater than the original size, i get overflow by the right and a scrollbar shows up. I wish to 'lock' the size of the grid and when i enlarge a column, the nearby column shrinks, as if the first column take the place of the second one.
Is there any way to do that?
Thanks.
0
Hello Juan Jose,
>> "I wish to 'lock' the size of the grid and when i enlarge a column, the nearby column shrinks, as if the first column take the place of the second one."
This column resizing behavior can be achieved only if Grid scrolling is disabled.
Regards,
Dimo
Telerik
>> "I wish to 'lock' the size of the grid and when i enlarge a column, the nearby column shrinks, as if the first column take the place of the second one."
This column resizing behavior can be achieved only if Grid scrolling is disabled.
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Fernando
Top achievements
Rank 1
answered on 20 Aug 2014, 11:51 AM
Hi, if i disable the scrolling of the grid, it works as i want, but also i can't specify the height of the grid. Can i disable only horizontal scrolling while the vertical scrolling is enabled?
Thanks.
Thanks.
0
Hi Juan Jose,
As I tried to explain, the desired column resizing behavior and Grid scrolling are mutually exclusive features. It is not possible to disable horizontal scrolling during column resize, while vertical is enabled.
Regards,
Dimo
Telerik
As I tried to explain, the desired column resizing behavior and Grid scrolling are mutually exclusive features. It is not possible to disable horizontal scrolling during column resize, while vertical is enabled.
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Fernando
Top achievements
Rank 1
answered on 20 Aug 2014, 12:52 PM
Hi, i understand, thanks for the answer.