Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1415
Highlight row based on column values
posted

Hi Team,

I am using Igx data grid, V9.1.28.

Requirement: I have a button in toolbar , on click of that values of grid changes. Now based on condition of columns i want to highlight the rows.

Data:

DATAany[] = [
  {
    ProductID: 1,
    ProductName: 'Chai',
    SupplierID: 1,
    CategoryID: 1,
    QuantityPerUnit: '10 boxes x 20 bags',
    UnitPrice: 18.0,
    UnitsInStock: 39,
    UnitsOnOrder: 30,
    ReorderLevel: 10,
    Discontinued: false,
   Status: 'done'
    OrderDate: new Date('2012-02-12'),
  },
  {
    ProductID: 2,
    ProductName: 'Chang',
    SupplierID: 1,
    CategoryID: 1,
    QuantityPerUnit: '24 - 12 oz bottles',
    UnitPrice: 19.0,
    UnitsInStock: 17,
    UnitsOnOrder: 40,
    ReorderLevel: 25,
    Discontinued: true,
    OrderDate: new Date('2003-03-17'),
    Status: 'done'
  }];

Suppose after button click this is above data and i have to check if values are not same
 UnitsInStock: 39 !== UnitsOnOrder: 30, than highlight with red or if equal highlight with green.