Kendo grid column template with locked column(s)

1 Answer 128 Views
Grid
Vladislav
Top achievements
Rank 2
Iron
Iron
Vladislav asked on 08 Aug 2023, 01:52 PM
Hello.

My question is. If I use a template for column (props: cell) and locked columns in the same grid. Grid does not behave correctly when scrolling. The body/columns of the grid scrolls, but the headers do not. How to use it correctly? We use version: 5.10.0

Well thank you.

1 Answer, 1 is accepted

Sort by
1
Accepted
Konstantin Dikov
Telerik team
answered on 10 Aug 2023, 09:29 AM

Hello Vladislav,

When using custom cell for a locked column, you need to include the styles and the class name coming from the "props", which handles the locked functionality (position and styles):

const MyCustomCell= (props) => {
  const { dataItem } = props;
  return (
    <td
      style={{ ...props.style }}
      className={props.className}
    >

You can also use our newly introduced "cells" property of the Grid/Columns and take advantage of the tdProps:

const CustomCell = (props) => {
  return (
    <td
      {...props.tdProps}

Hope this helps.

 

Regards,
Konstantin Dikov
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!

Vladislav
Top achievements
Rank 2
Iron
Iron
commented on 15 Aug 2023, 11:51 AM

It helped, thank you very much.
Tags
Grid
Asked by
Vladislav
Top achievements
Rank 2
Iron
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or