Grid: Sticky second column slides under the first column and is transparent.

1 Answer 63 Views
Grid
Christian
Top achievements
Rank 1
Iron
Iron
Iron
Christian asked on 07 Jun 2023, 12:23 PM | edited on 07 Jun 2023, 12:26 PM

Hi KendoReact team.

I have a question about locked columns. The second column slides under the first column and is transparent for the following columns. We use the following version ^5.12.0 of the "@progress/kendo-theme-default" package.

Issue

Code snippet

return [
    <Column
      key="SelectHeader"
      field={GRID_SELECTED_FIELD}
      filterable={false}
      width="50px"
      locked
      headerSelectionValue={dataResult.data.findIndex((item) => !selectedState[item.Id]) === -1}
    />,
    columnForField<SomeType>("SomeProp", {
      title: "Title",
      width: defaultColumnWidth,
      locked: true,
      columnMenu: RelationProjectStateColumnMenu,
      cell: relationProjectStateEnumCell,
    }),

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 09 Jun 2023, 11:29 AM

Hello Christian,

Thank you for reaching out to us.

When custom cells are used in combination with locked columns, you need to ensure to add the necessary class names and styles to the TD elements. Following is an example demonstrating such scenario with custom cells;

const nameCell = (props) => {
  return (
    <td
      className={props.className}
      style={{ ...props.style, color: '#00A6CE' }}
      colSpan={props.colSpan}
      role={'gridcell'}
      aria-colindex={props.ariaColumnIndex}
      aria-selected={props.isSelected}
    >
      {props.dataItem[props.field]}
      {props.children}
    </td>
  );
};

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Christian
Top achievements
Rank 1
Iron
Iron
Iron
commented on 27 Sep 2023, 08:04 AM

Hello Konstantin, thank you for your answer. I haven't had time to look into it yet. Sorry for the late reply. Best regards
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or