我試圖打電話的jqGrid的setGridWidth功能,但我得到的錯誤:的jqGrid-setGridWidth功能
Object [object Object] has no method 'setGridWidth'
我敢肯定,這是愚蠢的東西。這是顯示網格的代碼(這很好),然後嘗試調整它的大小。
$("#jqGridElement").jqGrid({
datastr: tableSrc,
jsonReader: { repeatitems: false },
datatype: "jsonstring",
colNames: ['title', 'subtitle'],
colModel: [
{ name: 'title', index: 'title', width: 55 },
{ name: 'subtitle', index: 'subtitle'}],
height: 'auto',
gridview: true
});
$("#jqGridElement").setGridWidth(600);'
編輯
我也試過:
var gridObj = $("#jqGridElement").jqGrid({ datastr: tableSrc, .......
gridObj.setGridWidth(300);
同樣的結果
你的假設是現貨。再次感謝。 –
如果你想去一個帽子戲法:) http://stackoverflow.com/questions/7260786/jqgridreloading-data –
我真的很喜歡你關於使用gridObj的建議。再次感謝。 –