Locked Right Column - Kendo Grid Angular

1 Answer 23 Views
Grid
Hi Kendo,

We have a requirement where we need to lock a couple of starting columns and one ending column in a Kendo Angular Grid.

We have implemented the lock feature for starting columns, but it doesn’t work as expected for the last (ending) column in the grid.

We are aware that this can be achieved by applying the ‘Sticky’ feature. But the problem with ‘Sticky’ feature is the horizontal scroll runs to the end of the grid. Ideally, the scrollbar should stop at the start of the last column. (Sticky column)

Is there any workaround to make the last(right) column locked? Or stop the scrollbar at the start of the last column in a ‘Sticky’ behavior?

Appreciate your support on this.

1 Answer, 1 is accepted

Sort by
0
Zornitsa
Telerik team
answered on 29 Mar 2024, 01:22 PM

Hi,

I noticed that you have a private support ticket opened with an identical context as this forum thread, in which my colleague has already provided an answer regarding this matter. Nevertheless, I will share the answer here as well since the information can be useful for other people in the community who may experience a similar scenario:

One possible way to position the locked columns of the Grid on the right side would be to set up the Grid in RTL mode. I would suggest checking out our Right-to-Left Support article where you will find more detailed information about the RTL functionality of the Grid. For your convenience, I am also sending a StackBlitz demo with a Grid component in RTL mode and locked columns enabled: 

https://stackblitz.com/edit/angular-fc9yux-h8i77c 

Another possible approach to position the locked columns of the Grid on the right side would be to indeed utilize the Sticky Columns functionality which can be used to emulate the behavior of locked columns:

https://www.telerik.com/kendo-angular-ui/components/grid/columns/sticky/#toc-stick-to-the-start-and-end 

Indeed, you are correct that using the Sticky Columns feature would render a horizontal scrollbar for the entire Grid including the sticky column. This can be explained with the default behavior of the Sticky Columns feature which implies that all columns are part of the Grid's scroll and replicating the Locked Columns' scroll could not be achieved.

The reason behind this is the fact that when utilizing the Locked Columns functionality, the Grid actually creates two separate tables - one of the tables contains the data of the locked column, and the other the rest of the data (which has its own advantages and disadvantages as well).

I completely understand that this behavior could be frustrating to some extent but as of now the only two possible approaches that would allow locking columns of the Grid to the right side are to set the Grid in RTL mode or utilize the Sticky Columns functionality with the slightly different behavior of the scroll.

In this line of thought, I would like to ask you to refrain from opening multiple tickets with the same subject and post separate matters either in the forum thread or as a private support ticket. This allows our team to maintain a clean support history of your account and respectively provide a better support service in general.

Thank you for your understanding and hope that the provided information was found helpful.

Regards,
Zornitsa
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Grid
Asked by
Answers by
Zornitsa
Telerik team
Share this question
or