I'm trying to update column's setting in Handsontable like this:
var newColumnSettings = [{ data: 0, readOnly: true }, { data: 1 }, { data: 2 }, { data: 3 }, { data: 4, readOnly: true }];
$('#container').handsontable('updateSettings', { columns: newColumnSettings });
But it simply does not work and nothing happens, and handsontable still shows the older columns.
Should I do something before or after? Am I doing something wrong?
Thanks in advance.
Have you tried to rerender the table after your updateSettings?
var newColumnSettings = [{ data: 0, readOnly: true }, { data: 1 }, { data: 2 }, { data: 3 }, { data: 4, readOnly: true }];
var ht = $('#container').handsontable('getInstance');
ht.updateSettings({ columns: newColumnSettings });
ht.render();
See if that helps