slickgrid-universal
slickgrid-universal copied to clipboard
Enable/disable alternate rows highlighting
Clear and concise description of the problem
Some grid instances don't needs to have alternate rows highlighting.
Suggested solution
We can add a new option to the grid settings like disableAlternateHighlighting or enableAlternateHighlighting and change a few lines in appendRowHtml function like this:
- (row === this.activeRow && this._options.showCellSelection ? ' active' : '') +
- (row % 2 === 1 ? ' odd' : ' even');
+ (row === this.activeRow && this._options.showCellSelection ? ' active' : '');
+
+ if (!this._options.disableAlternateHighlighting) {
+ rowCss += row % 2 === 1 ? ' odd' : ' even';
+ }
Alternative
No response
Additional context
No response
Validations
- [x] Follow our Code of Conduct
- [x] Read the Wikis.
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.