handsontable - Context menu to add column not working when defining columns property to hide some columns -
i needed way create spreadsheet user can potentially paste in no of columns. pasting things in spreadsheet not work mentioned here https://github.com/warpech/jquery-handsontable/issues/553, wanted enable context menu add together column. works fine when have plain array info source , not setting columns property, if need define columns attribute things dont work when setting
contextmenu: ['col_right']
. needed define columns property because need hide columns (as mentioned here https://github.com/warpech/jquery-handsontable/issues/120). way create things work define custom action context menu, not sure how go it.
here jsbin : http://jsfiddle.net/8v4z5/1/
thanks
ok 1 work around worked me requires playing bit info structure. seeing create context menu work when info source plain array , "columns" property should not defined , had provide plain array info source. illustration like:
var actualdata = [ {"spreadsheetdata":[ "kia", "nissan", "toyota", "honda"]}, {"year":"2008", "spreadsheetdata":[10, 11, 12, 13]}, {"year":"2009", "spreadsheetdata":[ 20, 11, 14, 13]}, {"year":"2010", "spreadsheetdata":[30, 15, 12, 13]} ]; var info = []; actualdata.foreach(function(d){ data.push(d.spreadsheetdata); });
example: http://jsfiddle.net/yw3we/
handsontable
No comments:
Post a Comment