2011-01-30 24 views
2

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; 
       } 
      }); 

任意のヘルプしてください?

+0

jqgridセットアップコードを表示できますか? – roman

+0

'grid_options'のすべてのコメントで、1つのコメントではありませんか?メンテナーはあなたを嫌うつもりです。 – Raynos

+0

@Raynos実際に私はメンテナーです:)と、これを書いた人は嫌いですが、彼は本当に素敵で、彼は支払っています:) – krulik

答えて

2

最終的には、postDataserializeGridDataポストバック(オプションからstringResult: trueを削除した後)に手動でシリアル化するソリューションを使用しました。

なぜ私たちはまだこのようなことが起こっていないのかわからないので、100%満足しているとは思えません。

だから私は多分誰かが有利になるだろう、この答えを受け入れていないよ:)

編集:他の解決策が見つからなかったので、これを受け入れます。

関連する問題