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
175
Conditional Cell Styling and State Persistence
posted

Good Afternoon,

I have a Igx-Grid that is using both the Igx State Directive and has Conditional Cell Styling attached to the Columns. The issue I am running into when trying to use both is when I load up the Columns that I have saved off to a service back up, the Conditional Cell Styling is not being applied.  From what I can tell looking at the JSON of the Grid Columns being captured by the State Directive, is that it does not appear to be grabbing the cellStyle part of the column, which I believe is causing the issue with the conditional styling not being applied appropriately.

For the time being, I found a work around which is to manually assign each column a '_cellStyles' property equal to the conditional cell style object I am using something like so:

for(let i=0; i<this.gridView.columns.length; ++i){

      if(this.gridView.columns[i].['_cellStyles'] === null){

          this.gridView.columns[i].['_cellStyles'] = this.styles;

      }

}

Not sure if this is a bug, oversight, or intentional.  For the time being the work around works as long as I can keep dynamically assigning conditional cell styling, it should not be an issue for me, but figured I would check to make sure.

-Randall

Parents
  • 175
    Offline posted

    Nevermind, apparently I completely missed the limitations section on this, my apologies.  Is the way I am setting cellStyles above, the correct way to do in initColumns? Or is there a better way to do it?

Reply Children
No Data