jqgrid searchGrid 参数api
时间: 2023-10-24 07:04:34 浏览: 93
jqGrid 的 searchGrid 参数是用于配置搜索对话框的选项。它是一个对象,包含了一系列可配置的属性,例如:
- `multipleSearch`:是否允许多条件搜索;
- `multipleGroup`:是否允许多条件分组;
- `top`:搜索对话框距顶部的距离;
- `left`:搜索对话框距左侧的距离;
- `width`:搜索对话框的宽度;
- `height`:搜索对话框的高度;
- `modal`:是否以模态框的形式显示搜索对话框;
- `closeAfterSearch`:搜索完成后是否自动关闭搜索对话框。
你可以在 jqGrid 的初始化配置中将 searchGrid 参数传入,例如:
```javascript
$("#grid").jqGrid({
url: "data.json",
datatype: "json",
colModel: [
{ name: "id", index: "id", width: 55 },
{ name: "name", index: "name", width: 90 },
{ name: "price", index: "price", width: 80, align: "right" },
{ name: "quantity", index: "quantity", width: 80, align: "right" }
],
pager: "#pager",
rowNum: 10,
rowList: [10, 20, 30],
sortname: "id",
sortorder: "desc",
viewrecords: true,
gridview: true,
caption: "My grid",
search: true,
searchGrid: {
multipleSearch: true,
multipleGroup: true,
top: 100,
left: 200,
width: 400,
height: 200,
modal: true,
closeAfterSearch: true
}
});
```
阅读全文