queryParams: { "pid": programeid },//通过queryParams向后台传参数
具体例子如:
$("#td").datagrid({
url: '@Url.Action("ListFunction")',
fitColumns: true,
fit: true,
rownumber: true,
pagination: true,
singleSelect: true,
pageSize: 10,
toolbar: "#toolbar",
onClickRow: onClickRow,
queryParams: { "pid": programeid },//通过queryParams向后台传参数
columns: [[
{ field: 'fid', title: '编号', width: 50, hidden: true },
{ field: 'pid', title: '程序编号', width: 50 },
{ field: 'fname', title: '功能编号', width: 50, editor: { type: 'validatebox', options: { required: true } } },
{ field: 'ctrname', title: '控制器', width: 50, editor: 'text' },
{ field: 'actname', title: '动作', width: 50, editor: 'text' },
{ field: 'detail', title: '功能描述', width: 100, editor: 'text' },
{ field: 'ispublic', title: '是否共用', width: 50, editor: { type: 'checkbox', options: { on: '是', off: '否' } } },
{ field: 'type', title: '基本权限', width: 50, editor: { type: 'checkbox', options: { on: '是', off: '否' } } },
{
field: 'kinds', title: '类型', width: 50, formatter: format, editor: {
type: 'combobox', options: {
data: [{
"id": "1",
"text": "函数"
}, {
"id": "2",
"text": "按钮函数"
}, {
"id": "3",
"text": "按钮"
}],
valueField: 'id',
textField: 'text',
editable: false
}
}
}
]]
})