css - changing background colors of grid rows dynamically in extjs 4.2.2 -


I have a grid that loads a list of data, and some data is replaced by a specific date value should change . If date is small then today's date, it should use the 'now' CSS class, otherwise 'later' It works fine, but my problem is that only one line background color is changing, so it does not go into the complete list.

Here's my grid:

  grid = Ext.create ('Ext.grid.Panel', {shop}, xtype: 'gridpanel', column: [ {Text: 'name', dataIndex: 'name', tdCls: 'x-grid cell'}], stripeRows: false, viewConfig: {getRowClass: function (record, index) {var date = Ext.Date.parse (record .get ('reminderDate'), "c") valueOf (); today var =. 'Now'}}, renderTo: Ext.Date.parse (Ext.Date.format (new date), 'YM-P '), "C") valueOf ();' later 'date; returned to today's: ext.getBody ()}); Edit:  

Backdrop colors change only on the top row in the grid, the rest remains unchanged. However, getrowclass calls every line.

CSS:

  .later .x-grid-cell {background-color: # FFB0C4; } .now .x-grid-cell {background-color: # 5491BD; }    

Problem detected.

New CSS file: Because I did "Important!" I had to put the custom CSS file before the standard ExtJS CSS with the flag.

  .later .x -grid-cell {background-color: #FFB0C4! Important; } .now .x-grid-cell {background-color: # 5491BD! Important; }    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -