Adding custom column

hi … @aleksandra_budnik hope your doing good, nice to text you,
the problem is that,

hot.updateSettings({
cells: function(row, col, prop) {
var cellProperties = {};

  // adding column classes
  if (col > 3) {
    cellProperties.className = 'result_column'
    
  } else {
    cellProperties.className = 'condition_column'
  }
  return cellProperties;
},
contextMenu: {
  items: {
    "col_left": {
      name: "insert column left",
      callback: function(key, options) {
      	myCol = hot.getSelected()[0][1];
        myData = hot.getDataAtCol(myCol); // here we get data from the column
        
        hot.alter('insert_col', myCol);
        
        for(var i = 0; i < hot.countRows(); i++){
        	hot.setDataAtCell(i, myCol, myData[i])
        }
      }
    },
    "col_right": {
      name: "insert column right",
      callback: function(key, options) {
      myCol = hot.getSelected()[0][1];
        hot.alter('insert_col', hot.getSelected()[0][1] + 1)
        // does some things after click
      }
    }
  }
}

})

we are checking the if condition for applying the classes to the columns,
i.e.

cells: function(row, col, prop) {
var cellProperties = {};

  // adding column classes
  if (col > 3) {
    cellProperties.className = 'result_column' // red color
    
  } else {
    cellProperties.className = 'condition_column' // green color
  }
  return cellProperties;
},

so it always add the classes to the column based on this condition, that’s why, if we add the column to left/right it will add but the column condition get executes so it won’t change the column class, so need to figure out how to change this condition dynamically.

http://jsfiddle.net/hanumantha_reddy/hwze45sb/6/

like if they add the column left/right using context menu we should change the column method condition than only we can achive this problem.
thank you @aleksandra_budnik, if you have idea or can you update the able jsfiddle i am also working on that if i get, i’ll get back to you @aleksandra_budnik