Approved
Last Updated: 16 Oct 2019 11:11 by ADMIN
Mojtaba
Created on: 14 Oct 2019 11:39
Category: Kendo UI for Angular 2+
Type: Feature Request
1
Provide a [max-width] input property for grid columns in a resizable Grid

Hello,

 

As I explained in this post, I would like to set max-width on certain columns of a grid to force them to not becoming bigger than a certain size if there is a remaining width in the parent container. However, I do need to distribute the remaining width across other columns if they don't have max-width.

 

For example in this project https://stackblitz.com/edit/max-width-request?embed=1&file=app/app.component.ts, I want the first column which shows the ID of products would never be bigger than 15. I'm advised to leave one of the columns without setting width, so that column will occupy the remaining width and as a result the width of columns with width will be respected as max-width. However, that is not good because in big screens you will end up with a very big column while other columns are still suffering from lack of space.

 

Thanks,

 

Mojtaba

1 comment
ADMIN
Svetlin
Posted on: 16 Oct 2019 11:11

Hi Mojtaba,

I discussed the requested functionality with the assigned developers. What could be done for this case is to provide a built-in [max-width] input property for the columns when the Grid is resizable.

However, when the Grid isn't resizable we will restrain from providing such feature.

In the demonstrated example all columns widths are set and their total value is smaller than the total width of the Grid. That is why the remaining width is distributed equally between all columns. But if the width of the first column only is set, then the widths of the other columns will be automatically adjusted to fill in the remaining space:

https://stackblitz.com/edit/angular-hw6f4i-wyiqtk?file=app/app.component.ts

Please check the following article about the available column widths configurations for the Grid:

https://www.telerik.com/kendo-angular-ui/components/grid/columns/width/

Let's keep any further discussion on this topic in the forum at the already opened thread:

https://www.telerik.com/forums/set-max-width-for-columns

I have just added two other suggestions.

Regards,
Svetlin
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.