Reputation: 73
How can I add class via cell template to the highest parent div of selection button cell? I need to add extra class name to the div with ui-grid-row class.
I have
.ui-grid-row:nth-child(odd):hover .ui-grid-cell{background:rgb(187,210,157) none repeat scroll 0% 0% }
.ui-grid-row:nth-child(even):hover .ui-grid-cell{background:rgb(187,210,157) none repeat scroll 0% 0% }
in my css file, and I do not want to hover selection button cells.
<div ng-style="Viewport.rowStyle(rowRenderIndex)" class="ui-grid-row ng-scope" ng-repeat="(rowRenderIndex, row) in rowContainer.renderedRows track by $index" ng-class="{'ui-grid-row-selected': row.isSelected}">
<div row-render-index="rowRenderIndex" ui-grid-row="row" role="row" class="ng-isolate-scope">
<!-- ngRepeat: (colRenderIndex, col) in colContainer.renderedColumns track by col.uid -->
<div ui-grid-cell="" role="rowheader" ng-class="{ 'ui-grid-row-header-cell': col.isRowHeader }" class="ui-grid-cell ng-scope ui-grid-coluiGrid-0005 ui-grid-row-header-cell" ui-grid-one-bind-id-grid="rowRenderIndex + '-' + col.uid + '-cell'" ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.uid" id="1444720102515-7-uiGrid-0005-cell">
<div class="ui-grid-disable-selection ng-scope">
<div class="ui-grid-cell-contents">
<div ng-click="selectButtonClick(row, $event)" ng-class="{'ui-grid-row-selected': row.isSelected}" class="ui-grid-selection-row-header-buttons ui-grid-icon-ok ng-scope">
</div>
</div>
</div>
</div>
<!-- end ngRepeat: (colRenderIndex, col) in colContainer.renderedColumns track by col.uid -->
</div>
</div>
Upvotes: 1
Views: 1746
Reputation: 73
ok, it's solved, just I add selector to my css file
.ui-grid-render-container-body .ui-grid-row:nth-child(odd):hover .ui-grid-cell{background:rgb(187,210,157) none repeat scroll 0% 0% }
.ui-grid-render-container-body .ui-grid-row:nth-child(even):hover .ui-grid-cell {background:rgb(187,210,157) none repeat scroll 0% 0% }
Upvotes: 1