Custom JS : Make cell dirty

onRowEditEndedFunction = function(e){ 
   var col = e.col; //get current column

   //only if the column index is ""B""
   if (col == 3){
        var row = e.row; //get current row
        var gridId = e._p._g.gridId; //get grid id
        var int1 = e._p.rows[row].dataItem.A; // get value of column A

        var newVal= int1 * 100; // new value to set to column B
        var newCol = 4; // col to set the value 

       //set new value to column B and make it dirty
         GridOS.ExternalAPI.setCellValue(row, newCol, newVal, gridId);
         var gObj =GridOS.ComponentUtils.getGridObjectById(gridId);
         gObj.grid.refresh();
         }
    else
      return;
};

            

 

  • Test

Leave a Comment