Posted 8 September 2017, 9:53 am EST
I’m populating a spreadsheet using a JSON datasource and sheet.bindColumns, and autoGenerateColumns=true.
I want the user to be able to edit some of the column headers though. I have a solution with a context menu option that uses javascript prompt() to get the new name, but what I really want is to edit the column header inline like a cell.
I see the 2015 v1 release has “Header CellType Enhancement” in the “whats new” page, but no details on what this is so I don’t know if it’ll help me.
I’ve attached a full working example. Right-click on one on the Custom 1 or Custom 2 column header and select Rename to get the javascript prompt for a new name. It works, it’s just too ugly for production. The code is in js/testtable.js around line 80.
