ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

How to remove row selection highlighting

Open sirix42 opened this issue 11 years ago • 5 comments

I am using ui-grid v3.0.0-RC.18. Instead of creating a column of checkmarks via a template, I decided to use the existing grid options to generate a column with 'Select All' enabled. The problem is I don't want to have the rows highlighted. How can I achieve this? Thanks.

$scope.gridOptions = {
    enableRowSelection: true,
    enableSelectAll: true,
    selectionRowHeaderWidth: 35,
    rowHeight: 25,
    showGridFooter:true,
    modifierKeysToMultiSelect: false,
    enableRowHeaderSelection: true,
};

sirix42 avatar May 11 '15 18:05 sirix42

This is a css property, so you can remove/modify it and the rows wont get highlighted.

dregan-gh avatar May 11 '15 18:05 dregan-gh

I see that it's the 'ui-grid-row-selected' class that does the highlighting. How do I remove it for just this grid? I have another grid on the same page that I do want highlighting enabled on a row selection. Thanks!

sirix42 avatar May 11 '15 19:05 sirix42

That's a bit trickier. You'd need to use some less/css inheritance to target the ui-grid-row-selected to only that specific grid.

PaulL1 avatar May 16 '15 04:05 PaulL1

Solution provided that may resolve this issue, no comment for 3 weeks, closing, please re-raise or reopen if this is still occurring.

PaulL1 avatar Jun 06 '15 01:06 PaulL1

you can use enableHighlighting:true

JavaBasketball avatar Oct 08 '15 08:10 JavaBasketball