我想在jqgrid中使用滚动(虚拟滚动)功能加载我的数据。
我一直在寻找好的文档和它的例子,但我发现只有asp.net框架,这也没有那么有用。
我在服务器端使用java-spring框架。
请为我的网格提供一些实现虚拟滚动功能的方法。
我的网格设置是这样的。
jQuery("#tree").jqGrid({
url:'json/jsonSamplePots.json',
datatype: "json",
mtype:'GET',
colNames: ["id", "no.", "name", "col1", "col2", "col3", "col4", "col5", "col6", "col7", "col8", "col9", "col10", "col11", "col12", "col13", "col14", "col15", "col16"],
colModel: [
{name:'id',width: 30, editable:false, align:"right",sortable:false, hidden: true, key: true},
{name:'no',width:80, editable:false, align:"left", sortable:true, sorttype:"int"},
{name:'name', width:150, editable:true, sortable:true, sorttype:"text"},
{name:'col1', width:80, editable:true, align:"right", sortable:true, sorttype:"int"},
{name:'col2', width:80, editable:true, align:"right", sortable:true, sorttype:"date"},
{name:'col3', width:80, editable:true, align:"right", sortable:true, sorttype:"date"},
{name:'col4', width:80, editable:true, align:"right", sortable:true, sorttype:"int"},
{name:'col5', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"date"},
{name:'col6', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"date"},
{name:'col7', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"int"},
{name:'col8', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"date"},
{name:'col9', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"date"},
{name:'col10', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"int"},
{name:'col11', width:120, editable:true, align:"left", sortable:true, sorttype:"text"},
{name:'col12', width:80, editable:true, align:"left", sortable:true, sorttype:"text"},
{name:'col13', width:80, editable:true, align:"right", sortable:true, hidden: true, sorttype:"text"},
{name:'col14', width:80, editable:false, align:"right", sortable:true, hidden: true, sorttype:"text"},
{name:'col15', width:300, editable:true, align:"left", sortable:true, sorttype:"int"},
{name:'col16', width:80, editable:true, align:"right", sortable:true, sorttype:"int"},
],
treeGridModel:'adjacency',
treeGrid: true,
cellEdit: true,
ExpandColumn:'name',
cellsubmit : 'clientArray',
scroll : 1,
loadonce : false,
jsonReader : {
root:"listTasks",
cell:"",
id: "id",
repeatitems:false
}
});
提前致谢.. !!