DataGrid: Fix the banded Columns' vertical borders (T1318812)#32802
Open
Alyar666 wants to merge 12 commits intoDevExpress:26_1from
Open
DataGrid: Fix the banded Columns' vertical borders (T1318812)#32802Alyar666 wants to merge 12 commits intoDevExpress:26_1from
Alyar666 wants to merge 12 commits intoDevExpress:26_1from
Conversation
88936f8 to
ccd2691
Compare
packages/devextreme/js/__internal/grids/grid_core/column_headers/m_column_headers.ts
Show resolved
Hide resolved
Comment on lines
+254
to
+257
| this.setStickyOffsets(); | ||
|
|
||
| if (columnHidingEnabled) { | ||
| this.updateColumnNoBorderClasses(); |
There was a problem hiding this comment.
updateColumnNoBorderClasses() walks all rendered rows/cells and calls needToRemoveColumnBorder per cell. After this change it runs on every _resizeCore() whenever columnHidingEnabled is true, even when no columns are actually being hidden, which can add significant resize overhead on large grids. Consider restoring a guard similar to the previous adaptiveColumns.getHidingColumnsQueue().length/hasHiddenColumns() check before doing the full traversal.
packages/devextreme/js/__internal/grids/grid_core/sticky_columns/m_sticky_columns.ts
Show resolved
Hide resolved
ccd2691 to
2899a74
Compare
packages/devextreme-scss/scss/widgets/base/dataGrid/layout/cell.scss
Outdated
Show resolved
Hide resolved
Comment on lines
+193
to
+194
| .dx-widget:not(.dx-rtl) .dx-row > td.dx-#{$widget-name}-group-space + td, | ||
| .dx-widget:not(.dx-rtl) .dx-row > tr > td.dx-#{$widget-name}-group-space + td { |
| const $cellElement = super._createCell.apply(this, arguments); | ||
| const rowCount = this.getRowCount(); | ||
|
|
||
| if (rowCount > 1) { |
packages/devextreme/js/__internal/grids/grid_core/sticky_columns/m_sticky_columns.ts
Show resolved
Hide resolved
77856d4 to
d98ceff
Compare
|
|
||
| // (0,7,1) | ||
| .dx-treelist .dx-treelist-sticky-columns .dx-treelist-content .dx-treelist-table .dx-row.dx-column-lines > td.dx-treelist-first-header { | ||
| .dx-treelist:not(.dx-rtl) > .dx-gridbase-container > .dx-header-multi-row .dx-datagrid-table .dx-row > td.dx-treelist-first-header { |
| // (0,8,1) | ||
| .dx-rtl.dx-treelist .dx-treelist-sticky-columns .dx-treelist-content .dx-treelist-table .dx-row.dx-column-lines > td.dx-treelist-first-header { | ||
| // (0,7,1) | ||
| .dx-rtl > .dx-gridbase-container > .dx-header-multi-row .dx-datagrid-content .dx-datagrid-table .dx-row > td.dx-datagrid-first-header { |
| return true; | ||
| }, | ||
|
|
||
| isFirstColumn: function() { |
04062b7 to
a784fb8
Compare
Comment on lines
+391
to
+395
| const rowCount = this.getRowCount(); | ||
|
|
||
| if (rowCount > 1) { | ||
| this.toggleFirstHeaderClass($cellElement, column, options.rowIndex); | ||
| } |
Comment on lines
+91
to
+107
| private updateFirstHeaderClasses(): void { | ||
| const $rows = this._getRowElementsCore().toArray(); | ||
|
|
||
| $rows.forEach((row: Element, rowIndex: number) => { | ||
| const $cells = $(row).children('td').toArray(); | ||
| const columns = this.getColumns(rowIndex); | ||
|
|
||
| $cells.forEach((cell: Element, cellIndex: number) => { | ||
| const $cell = $(cell); | ||
| const column = columns[cellIndex]; | ||
|
|
||
| if (column) { | ||
| this.toggleFirstHeaderClass($cell, column, rowIndex); | ||
| } | ||
| }); | ||
| }); | ||
| } |
Comment on lines
+244
to
258
| protected _resizeCore(): void { | ||
| const hasStickyColumns = this.hasStickyColumns(); | ||
| const adaptiveColumns = this.getController('adaptiveColumns'); | ||
| const hidingColumnsQueue = adaptiveColumns?.getHidingColumnsQueue(); | ||
| const columnHidingEnabled = this.option('columnHidingEnabled'); | ||
|
|
||
| super._resizeCore.apply(this, arguments as any); | ||
| super._resizeCore.apply(this); | ||
|
|
||
| if (hasStickyColumns) { | ||
| this.setStickyOffsets(); | ||
| if (!hasStickyColumns) { | ||
| return; | ||
| } | ||
|
|
||
| if (hidingColumnsQueue?.length) { | ||
| this._updateBorderClasses(); | ||
| } | ||
| this.setStickyOffsets(); | ||
|
|
||
| if (columnHidingEnabled) { | ||
| this.updateColumnNoBorderClasses(); | ||
| } |
Comment on lines
+498
to
+506
| protected _resizeCore(): void { | ||
| const rowCount = this.getRowCount(); | ||
| const columnHidingEnabled = this.option('columnHidingEnabled'); | ||
|
|
||
| super._resizeCore.apply(this); | ||
|
|
||
| if (rowCount > 1 && columnHidingEnabled) { | ||
| this.updateFirstHeaderClasses(); | ||
| } |
be6ac0c to
f9562be
Compare
Comment on lines
+91
to
+107
| private updateFirstHeaderClasses(): void { | ||
| const $rows = this._getRowElementsCore().toArray(); | ||
|
|
||
| $rows.forEach((row: Element, rowIndex: number) => { | ||
| const $cells = $(row).children('td').toArray(); | ||
| const columns = this.getColumns(rowIndex); | ||
|
|
||
| $cells.forEach((cell: Element, cellIndex: number) => { | ||
| const $cell = $(cell); | ||
| const column = columns[cellIndex]; | ||
|
|
||
| if (column) { | ||
| this.toggleFirstHeaderClass($cell, column, rowIndex); | ||
| } | ||
| }); | ||
| }); | ||
| } |
added 3 commits
March 19, 2026 02:31
… selectors The border-left/border-right rules for multi-row headers incorrectly targeted all .dx-row elements inside the headers container. This caused filter row cells to get unexpected borders when band columns were present and showColumnHeaders was false. Narrowing the selector to .dx-header-row ensures only actual header rows are affected.
Comment on lines
+56
to
+58
| public getHeaderCells(rowIndex = 0): NodeListOf<HTMLElement> { | ||
| return this.getHeaderRows()[rowIndex].querySelectorAll('td'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.