2014-12-31 1 views
0

http://jsfiddle.net/kc11/y66uc1cq/을 사용하여 handsontable 뷰에 포함 된 일부 데이터를로드하려고합니다. JS가 유효하더라도 :로컬 데이터가있는 handsontable을로드 할 수 없습니다.

$(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); 





}); 

로드가 발생하지 않습니다. 왜, 어떻게 고칠 수 있습니까?

+0

그건 플러그인 권리?). – Shahar

답변

1
바이올린의 모든 참조가 파손되기 때문에 테스트,하지만이 시도 하드

:

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

출처 : http://handsontable.com/demo/understanding_reference.html 당신의 JSFiddle도 (고사하고 handsontable 플러그인을 jQuery를하지 않습니다

+0

안녕하세요, 브렌트, 나는 일할 수 없었지만 당신의 레퍼런스는 나를 도왔습니다. 고맙습니다. – user61629

관련 문제