Kendo Grid Column fixed width

1 Answer 114 Views
General Discussions Grid
Levon
Top achievements
Rank 1
Iron
Iron
Levon asked on 12 Nov 2024, 08:08 AM
There is a kendo grid with 8 columns. The width param is set to all columns. 
I would like to have one column always be mentioned value. and never receive distributed portion.

More Details:

From Official documentation at https://www.telerik.com/kendo-angular-ui/components/grid/columns/width we know that

When all column widths are explicitly set and the cumulative column width is less than the available Grid width, the remaining width is distributed evenly between all columns

At my use case, in about 50 grids, there are same "Date" columns (YYYY-MM-DD formatted). So when it will be "perfect" that the columns be always same value and do not become "wider" for case when cumulative column width is less than the available Grid width.

Is it possible?

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 15 Nov 2024, 07:21 AM

Hello Levon,

Yes, width distribution is typical for  HTML tables. To ensure a specific column in the Kendo Grid maintains a fixed width and does not receive any distributed portion of the extra space when the cumulative column width is less than the available Grid width, you can leave just one column without a set width. In this case, that column will take any excessive width or get smaller when the Grid width is reduced, keeping the rest of the column untouched.

https://stackblitz.com/edit/angular-tte1xj?file=src%2Fapp%2Fapp.component.ts

Another option which will keep the width of the Date column is to make it locked. But this feature has specific use case which might not fit your project requirements. 

I hope this helps.

    Regards,
    Martin Bechev
    Progress Telerik

    Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

    Tags
    General Discussions Grid
    Asked by
    Levon
    Top achievements
    Rank 1
    Iron
    Iron
    Answers by
    Martin Bechev
    Telerik team
    Share this question
    or