Grid: Locked Columns - Extra Space

2 posts, 0 answers
  1. Bill
    Bill avatar
    15 posts
    Member since:
    Jun 2019

    Posted 11 Dec 2020 Link to this post

    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!

     

     

     

  2. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 11 Dec 2020 Link to this post

    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/.

Back to Top