mercredi 31 décembre 2014

Loading handsontable with local data fails


I am trying to use http://ift.tt/13Kis5t to load some data which I have included into a handsontable view. Although the JS is valid:



$(document).ready(function () {

function getCarData() {
return [
["Nissan", 2009, "black", "black"], ["Nissan", 2006, "blue", "blue"], ["Chrysler", 2004, "yellow", "black"], ["Volvo", 2012, "white", "gray"]];
}

var data = [
["", "Kia", "Nissan", "Toyota", "Honda"],
["2008", 10, 11, 12, 13],
["2009", 20, 11, 14, 13],
["2010", 30, 15, 12, 13]
];




$("#example1").handsontable({
data: data,
minRows: 5,
minCols: 6,
minSpareRows: 1,
currentRowClassName: 'currentRow',
currentColClassName: 'currentCol',
autoWrapRow: true,
rowHeaders: true,
colHeaders: true
});


$("#example1").handsontable('selectCell', 3, 3);





});


The load is not occurring. Why and how can I fix this?





Aucun commentaire:

Enregistrer un commentaire