邓超
ToQuery
表格组件(panTable)的使用
2014-07-28 16:37:08   阅读1969次

一丶初始化组件

$("#table").panTable({
     colModel:[
           {name:"列1",index:"c1",width:"40",edittype:"text"},
           {name:"列2",index:"c2",width:"50",edittype:"checkbox"},
           {name:"列3",index:"c3",width:"60",edittype:"radio"},
           {name:"列4",index:"c4",width:"60",edittype:"reftext",editoptions:options},
           {name:"列5",index:"c5",width:"60",edittype:"select",editoptions:{v1:"选1",v2:"选项2",v3:"选项3",v4:"选项4",v5:"选项5",v6:"选项6"}},
           {name:"列12",index:"c12",width:"60",edittype:"select",editoptions:{v1:"选项1",v2:"选项2",v3:"选项3"}},
     ],
     rowtitle: true, //是否显示行号
     columnresize: true,
     rowresize: true,
     multselect: true,
     rowtitle:true,//是否显示行标题
     columntitle:true,//是否显示列标题
     rowresize:true,//行是否可以改变高度
     columnresize:true,//列是否可以改变宽度
     multselect: true,//是否支持多选
});

二丶填充数据:

    数据的参数:六个,各项代表什么含义?

function addData(count){//根据传入参数控制添加的行号
	console.info("开始执行:"+new Date().getTime());
	var data = new Array();
	for(var i=0;i<count;i++){
		data.push({c1:"11",c2:true,c3:"13",c4:"14",c5:"15",c6:"16"});
	}
	console.info("组织数据结束:"+new Date().getTime());
	console.info("开始填充数据:"+new Date().getTime());
	$("#table").panTable("addRowsData",data);
	console.info("填充数据结束:"+new Date().getTime());
		
}




-----------------------------------------------------
转载请注明来源此处
原地址:#

-----网友评论----
暂无评论
-----发表评论----
微网聚博客乐园 ©2014 blog.mn886.net 鲁ICP备14012923号   网站导航