jqgrid 添加水平滚动条

通过设置:

shrinkToFit:false,  
autoScroll: true, 

grid.jqGrid({
			treeGrid: true,
			treeGridModel: "adjacency",
			ExpandColumn: "name",//指定用于张开treeGrid的列,当treeGrid为true时有效.
            ExpandColClick: true,
		 	treedatatype: "json",
		 	loadui:"disable",
		    mtype: "POST",
		    colNames: ["部门\\人员","id","总任务","总完成额",
		               "总机会额","总预估完成额","总预估完成率",
						"视频任务","视频完成额","视频机会额",
						"视频预估完成额","视频预估完成率",
						"门户任务","门户完成额","门户机会额",
						"门户预估完成额","门户预估完成率",
						"无线任务","无线完成额","无线机会额",
						"无线预估完成额","无线预估完成率"],
			colModel: [
				       {name: "name",width:300,align:'left',sortable:false},//resizable可拖拽改变宽窄
				       {name: "id",width:1, hidden:true, key:true,sortable:false},
				       {name: "targetTotal",sortable:false},
				       {name: "completeTotal",sortable:false},
				       {name: "opportunityTotal",sortable:false},
				       {name: "dicreetTotal",sortable:false},
				       {name: "dicreetTotalRate",sortable:false},
				       {name: "targetVideo",sortable:false},
				       {name: "completeVideo",sortable:false},
				       {name: "opportunityVideo",sortable:false},
				       {name: "dicreetVideo",sortable:false},
				       {name: "dicreetVideoRate",sortable:false},
				       {name: "targetInternet",sortable:false},
				       {name: "completeInternet",sortable:false},
				       {name: "opportunityInternet",sortable:false},
				       {name: "dicreetInternet",sortable:false},
				       {name: "dicreetInternetRate",sortable:false},
				       {name: "targetWireless",sortable:false},
				       {name: "completeWireless",sortable:false},
				       {name: "opportunityWireless",sortable:false},
				       {name: "dicreetWireless",sortable:false},
				       {name: "dicreetWirelessRate",sortable:false}
			],
		    height:'auto',
	  	    shrinkToFit:false,  
		    autoScroll: true
		  });


你可能感兴趣的:(web前端)