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

Grid: Locked Columns - Extra Space

1 Answer 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Veteran
Bill asked on 11 Dec 2020, 10:25 AM

I've looked through the forums and it seems this is the expected behavior, but is there a way to have the grid expand to fill the space when columns are locked?

 

Also if we have the first two columns locked is there a way to prevent reordered columns to be placed in between them or before them?

 

Thanks for your help and direction in the past!

 

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 11 Dec 2020, 02:27 PM

Hello, Bill,

This is indeed an expected behavior as the locked columns require a fixed width for the Grid and the columns. The locked columns are used in cases where the combined width of all columns is larger than the Grid width and scrolling is needed. In those cases, if a column has no width it will be removed from the Grid as there will be no space for it. If the Grid will not be scrollable there is no need for locked columns as all columns will be visible.

As for fixing the locked columns at the beginning of the Grid, this can be done by setting the orderIndex of those columns to 0, this will prevent any columns to be placed before or between them:

https://www.telerik.com/kendo-react-ui/components/grid/api/GridColumnProps/#toc-orderindex

I made an example showcasing this:

https://stackblitz.com/edit/react-zpn8cy?file=app/main.jsx

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Bill
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Share this question
or