I stuck as closely to the myfirstgrid and demo examples as possible in the relevant code:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<div class="sfcode">function populateTable() {<br /> jQuery("#timeline").jqGrid({<br /> datatype: "local",<br /> height: 250,<br /> colNames:['Start','Symptom','Duration'],<br /> colModel:[<br /> {name:'start',index:'start', width:60, sorttype:"int"},<br /> {name:'name',index:'name', width:90, sortable:false},<br /> {name:'duration',index:'duration', width:100, sortable:false}<br /> ],<br /> multiselect: false,<br /> caption: "Event Timeline"<br /> });<br /> <br /> for(var i=0;i<=globalArray.length;i++) {<br /> jQuery("#timeline").jqGrid('addRowData',i+1,globalArray<i>);<br /> };<br /> }</i></div> |
With a blank table
|
1 |
<table id="timeline"></table> |
in the corresponding html.
When the function is called, the second line of code throws the error: “Error: Object doesn't support property or method 'jqGrid'” at line 2, above.
Any help would be appreciated.
