I have a custom cell in kendo react tree list. I want to freeze that column. Setting column property locked: true does not work.
Any ideas on how to achieve this behavior?
Thanks!
1 Answer, 1 is accepted
0
Wissam
Telerik team
answered on 04 Apr 2024, 11:04 AM
Hi, Satbir,
You can achieve this by also adding the following properties to the td element. These are applied to the default cells when they are locked, but since we are custom rendering the cells, we need to add them:
Thank you, yes this solution works fine when I am freezing only the first custom column.
I have two custom columns and I need to freeze both of them, This solution does not work with that. Even in your example if I add Full Time again, it does not work as expected.
Can you help with that?
Wissam
Telerik team
commented on 15 Apr 2024, 10:52 AM
Hi, Satbir,
For the second column, the `class` is `k-table-td k-grid-content-sticky` and the `right` CSS value is `0px` instead of `100px`. I updated the example where I rendered a separate cell `MyCell2` for the "Name" column:
In addition, just for more information on how I found the solution, I inspected the `td` element of the above example that does not include the custom cells using Chrome devtools to check what classes are rendered and what CSS styles are applied.
Let me know if you have any further questions on this matter.