After remove column second last column become readonly

Tags: #<Tag:0x00007efc6469f408>

Hello

Here I tried to make last column readonly using cells method, but after remove one column last and second last column will become readonly.

let handSonSelector = document.getElementById("employee-handson");
        let header = ["name","state", "class code", "description", "Q1-17", "Q2-17", "Q3-17", "Q4-17", "Total"]
        var hot = new Handsontable(handSonSelector, {
            startCols: header.length,
            startRows: 2,
            rowHeaders: true,
            manualRowResize: true,
            stretchH: 'all',
            width: '100%',
            height: '100%',
            autoRowSize: true,
            colHeaders: header,
            contextMenu: true,
            formulas: true,
            //fixedRowsBottom: 1,
            //autoColumnSize: {useHeaders: true},
            ///mergeCells: [ {row: 1, col: 0, rowspan: 1, colspan: 4}],
            //ht.updateSettings({mergeCells: [ {row: rows-1, col: 0, rowspan: 1, colspan: 4}]})
            //bindRowsWithHeaders: true,
            cells: function (row, column,prop) {
                var cellMeta = {};
                if (column === 1 && (this.instance.countRows()-1)!=row) {
                    cellMeta.type = 'autocomplete';
                    cellMeta.source = Object.keys(policyState),
                    cellMeta.allowInvalid = false
                }
                if (column === 2 && (this.instance.countRows()-1)!=row) {
                    cellMeta.type = 'autocomplete';
                }
                if (column > 4) {
                    cellMeta.className = 'sum_column';
                }
                //make column readonly
                if ((this.instance.getColHeader().length-1)==column) {
                    cellMeta.className = 'total_column';
                    cellMeta.readOnly = true;
                }
                if ((this.instance.countRows()-1)==row) {
                    ///cellMeta.className = 'total_column';
                    cellMeta.readOnly = true;
                }
                return cellMeta;
            }
        })

Thank you for sharing @mayankvadiya.kanhaso

I’ve simplified the example and it looks like the formulas are causing those issues https://jsfiddle.net/xs68pLq2/
It also applies to rows.

I have reported this issue on our Github board https://github.com/handsontable/handsontable/issues/6751 and will update you as soon as we get it fixed.

Thank you for appreciate

This issue was solved in v.9.0.0.