[Vuejs]-How can i valid the data of an ag-grid cell?

0👍

you need to make sure if you are doing type comparison with equality comparator then both side are of same type params.documentId === 9?'':'myClass'; this will only work when params.documentId is a number else it will always be false. either change === to == comparison or make sure the types are same.

0👍

Try this using cellStyle

{
 cellEditor: 'numberRenderer',
 cellStyle: function (params) {
   if(params.value !==9){
         setTimeout(() => {
                params.api.refreshCells({
                    force: true,
                    rowNodes: [params.api.node], 
                });
            }, 10000);
      return {background: 'red'};
      }
    }
  }

Try to refresh :-

params.api.refreshCells({
             force: true,
             rowNodes: [params.api.node]
   });

Leave a comment