how to dump all setting of handsontable instance and save to server(not save data in table to server)

Viewed 203

I want to achieve: One user creates handsontable using client browser: to insert or delete some columns, edit column headers, fix some rows or columns by context menu for other users to fill. So I need to save handsontable structure to server.

The following code initialize a 3*3 handsontable with contextMenu: true

var
    $$ = function(id) {
    return document.getElementById(id);
  },
  container = $$("example"),
  hot;
  
  Handsontable.dom.addEvent(createtable, "click", function() {
      hot = new Handsontable(container, {
      rowHeaders: true,
      colHeaders: true,
      dropdownMenu: true,
      startRows: 3,
      startCols: 3,
      contextMenu: true,
      licenseKey: 'non-commercial-and-evaluation',
    })
  })
  

Then I set column A readonly by context menu. Using following code get columns option. I expect the result is [{readonly: true},{},{}], but it is undefined

  Handsontable.dom.addEvent(gettablesetting, "click", function() {
    console.log(hot.getSettings().columns)
  })

how to dump all options of handsontable instance and save to server for other users to fill.

jsfiddle code

0 Answers
Related