0

I’m using the KendoReact library to render a Pivot Table (PivotGrid) in my React project.I’ve customized the Pivot Table’s styles and layout according to my requirements. Table is presnt On Two pages 1 Page: only Table renders (no issues) 2 Page: on half screen table and other half pdf ( issue present )

The problem: After these customizations, the row headers and the pivot table values are no longer staying in sync when scrolling vertically on 2 page

Specially on windows while on Mac it is working fine majority of times.

Environment:

React: 18.x KendoReact: 7.x Browser: Chrome (latest)

What I’ve tried so far:

Making the container scrollable — this does sync the values but causes the row headers to hide while scrolling.

Adjusting Kendo’s default CSS overrides — but still facing misalignment between the row headers and data cells.

Checking if Kendo’s built-in scrollable or locked columns features can help — no luck so far.

Expected behavior: When I scroll, the row headers should stay aligned with the corresponding rows in the pivot table values, without hiding or misaligning.

[While scrolling vertically at the bottom values and row headers get out of synch]

.pivot-height-validate {
  width: 100% !important;
  overflow: auto !important;
  position: relative;
  max-height: 75vh;

  .k-pivotgrid-row-headers {
    .k-pivotgrid-table {
      width: inherit !important;
    }
  }
  .k-pivotgrid-cell {
    p {
      font-size: 10px;
    }
  }

  .not-validated {
    background-color: #f7e1e1;

    &.selected-cell {
      border: 3px solid #e95454 !important;
    }
  }

  .validated {
    background-color: #ecf5ed;

    &.selected-cell {
      border: 3px solid #6fe97d !important;
    }
  }

}

.pivot-table-container {
  width: 100% !important;
  position: relative;
  overflow: auto !important; 
  max-height: 75vh;

  .k-pivotgrid-row-headers {
    .k-pivotgrid-table {
      width: inherit !important;
    }
  }

  .k-pivotgrid-column-headers {
    .k-pivotgrid-table {
      width: 100% !important;
      position: sticky;
      top: 0;
      z-index: 2;
    }
  }

  .k-pivotgrid-values {
    width: inherit !important;
    position: relative;
    z-index: 1;
  }

  .k-pivotgrid-cell {
    p {
      font-size: 10px;
    }
  }

  .not-validated {
    background-color: #f7e1e1;

    &.selected-cell {
      border: 3px solid #e95454 !important;
    }
  }

  .validated {
    background-color: #ecf5ed;

    &.selected-cell {
      border: 3px solid #6fe97d !important;
    }
  }
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.