datagrid传值url方法1:<input type="hidden" id="sortid">
<table id="dg" class="easyui-datagrid" title="标题" data-options="iconCls: ‘icon-save‘,singleSelect: false,sortOrder:‘desc‘,toolbar: ‘#tb‘,idField:‘id‘, url: ‘${ctx }/shzy/Manager?sortid=‘+$("#sortid").val(),method: ‘post‘,pagination:true,fitColumns:false,fit:true,height:420,sortName:‘serialNumber‘,">
<thead> <tr> <th data-options="field:‘ck‘,checkbox:true"></th> <th data-options="field:‘serialNumber‘,width:80,align:‘center‘,sortable:‘true‘">流水号</th> <th data-options="field:‘recordTime‘,width:90,align:‘center‘,sortable:‘true‘">录入时间</th> <th data-options="field:‘recordOperator‘,width:90,align:‘center‘,sortable:‘true‘">录入人员</th> <%--<th data-options="field:‘source‘,width:80,align:‘center‘,sortable:‘true‘">来源</th>--%> <th data-options="field:‘title‘,width:180,align:‘center‘,sortable:‘true‘">标题</th> <th data-options="field:‘content‘,width:320,align:‘center‘">主要内容</th> <%--<th data-options="field:‘exp2‘,width:100,align:‘center‘,sortable:‘true‘">分类</th>--%> <th data-options="field:‘annex‘,width:80,align:‘center‘,hidden:‘true‘">附件</th> </tr> </thead></table>方法2:<table id="dg" toolbar="#tb"></table>
$(‘#dg‘).datagrid({
idField : ‘id‘,
title:"社会资源管理",
url:"/ccewis/shzy/Manager?sortid="+document.getElementById(‘sortid‘).value,
fit : true,
height:420,
loadMsg : ‘数据加载中...‘,
pageSize:10,
method:‘post‘,
pagination:true,
sortName:‘serialNumber‘,
sortOrder:‘desc‘,
pageList:[10,20,30,40,50],
columns:[[
{field:‘ck‘,checkbox:true},
{field:‘id‘,title:‘id‘,hidden:true},
{field:‘serialNumber‘,title:‘流水号‘,width:80,align:‘center‘,sortable:true},
{field:‘recordTime‘,title:‘录入时间‘,width:90,align:‘center‘,sortable:true},
{field:‘recordOperator‘,title:‘录入人员‘,width:90,align:‘center‘,sortable:true},
{field:‘source‘,title:‘来源‘,width:80,align:‘center‘,sortable:true},
{field:‘title‘,title:‘标题‘,width:180,align:‘center‘,sortable:true},
{field:‘content‘,title:‘主要内容‘,width:320,align:‘center‘,sortable:true},
{field:‘exp2‘,title:‘分类‘,width:100,align:‘center‘,sortable:true},
{field:‘annex‘,title:‘附件‘,width:80,align:‘center‘,sortable:true}
]],
overflow : false,
fitColumns : false,
singleSelect : false
});