11046

How to remove zebra striping from ng-grid

Question:

Seems like this should be an easy thing to do, but I'm not finding it. An ng-grid is zebra striped by default, how do I remove it?

Answer1:

Add this to your style to override the zebra css:

<style> .ngRow.even { background-color: rgb(255, 255, 255); } .ngRow.odd { background-color: rgb(255, 255, 255); } </style>

This will make both rows white. Change it to whatever color you need.

Answer2:

If you are going to add the modifications in a stylesheet after the ngGrid stylesheet (ngGrid.css), you should do it this way for avoiding losing ngRow.selected class

.ngRow.even { background-color: #ffffff; } .ngRow.odd { background-color: #ffffff; } .ngRow.selected { background-color: #BDD5FF; }

Recommend

  • p:panelGrid inside p:panelGrid, how to remove borders in an outer p:panelGrid?
  • WPF auto resize elements
  • jqGrid setting zIndex for alertmod
  • Stalling at deallocate
  • Apply PivotItemHeader style to PivotItem in UWP
  • Can you use multiple instances of Edge on a Selenium Grid Node?
  • Having an issue with my TextBox control template
  • How to delete a newline using \\b
  • How to start server for Selenium grid Java Maven setup
  • Allocating a 2D contiguous array within a function
  • Not able to display correct data in table -AngularJS
  • Dynamically load css stylesheet and wait for it to load
  • Function calls are not supported. Consider replacing the function or lambda with a reference to an e
  • Adjust width of select element according to selected option's width
  • How do I alternate colors in Flat List (React Native)
  • Listbox within Listbox and scrolling trouble in Windows Phone 7 Silverlight
  • Meteor helpers not available in Angular template
  • Android fill_parent issue
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Update CALayer sublayers immediately
  • JFileChooser in front of fullscreen Swing application
  • Modifying destination and filename of gulp-svg-sprite
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • jquery mobile loadPage not working
  • Unanticipated behavior
  • CSS Applying specific rule for a specific monitor resolution with only CSS is posible?
  • Angular 2 constructor injection vs direct access
  • Java static initializers and reflection
  • Change div Background jquery
  • Android Google Maps API OnLocationChanged only called once
  • unknown Exception android
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • failed to connect to specific WiFi in android programmatically
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize