filterToolbar
検索オプションを使用しようとしています。 残念ながら、パラメータを含む検索文字列はURLに追加されません。 は、デバッグでは、私は、この行が実行されていることを参照してください。jqGridは検索パラメータをURLに追加しません
590 if(!bsr) { $($t).jqGrid("setGridParam",{search:sd}).trigger("reloadGrid",[{page:1}]); }
sd
は、私の場合には真です。
サーバーに送信する必要がある値は、送信されないsdata
という変数に格納されています。私はまた、postData
フィルタに正しいデータが入っているが、送信されていないことも確認しています。
また、私は$t.p.searchurl
が未定義であることに気付きました。 (混乱して申し訳ありません)
この私のjqGridの初期化:
grid_options = {
altclass: "grid-altrow",
altRows: true,
autowidth: true,
beforeSelectRow: edit,
datastr: datastr,
datatype: datatype,
height: "100%",
hidegrid: false,
multiselect: true,
multiselectWidth: 45,
onPaging: do_page,
onSortCol: sort,
pager: "#pager",
rowNum: ROW_NUM,
sortname: "zone",
url: url.toString(),
gridComplete: grid_complete,
jsonReader: {
page: page,
records: records,
repeatitems: false,
root: root,
total: total
},
prmNames: {
addoper: null,
deloper: null,
editoper: null,
id: null,
nd: null,
npage: null,
oper: null,
order: null,
page: null,
rows: null,
search: null,
sort: null,
subgridid: null,
totalrows: null
},
colNames: [
"Entry Id",
"Zone",
"IP Address",
"Netmask",
"Description"
],
colModel: [
{
hidden: true,
index: "id",
name: "id"
},
{
editable: true,
editoptions: {
value: zone_map
},
edittype: "select",
index: "zone",
name: "zone"
},
{
editable: true,
editrules: {
required: true
},
index: "ip",
name: "ip"
},
{
editable: true,
editoptions: {value: netmask_edit_options_value},
edittype: "select",
index: "netmask",
name: "netmask",
stype: "select"
},
{
editable: true,
edittype: "custom",
index: "comment",
name: "comment"
}
]
};
grid.jqGrid(grid_options);
grid.jqGrid("filterToolbar", {
searchOnEnter : false,
stringResult: true,
beforeSearch: function(e) {
debugger;
}
});
任意のヘルプしてください?
jqgridセットアップコードを表示できますか? – roman
'grid_options'のすべてのコメントで、1つのコメントではありませんか?メンテナーはあなたを嫌うつもりです。 – Raynos
@Raynos実際に私はメンテナーです:)と、これを書いた人は嫌いですが、彼は本当に素敵で、彼は支払っています:) – krulik