2012-03-11 56 views

回答

2

本地化的問題是the lines中的錯誤,其中jqFilter方法將由searchGrid方法調用。方法jqFilter支持groupOps選項,這些選項已經在許多本地化文件grid.locale-XX.js中設置,但jqFilter方法將被稱爲而沒有設置選項。

要解決這個問題應該只需添加

groupOps: p.groupOps, 

到的jqFilter方法的調用中使用的選項列表。您可以在jquery.jqGrid.src.jsjquery.jqGrid.min.js中搜索文本).jqFilter({以找到相應的位置。在jqGrid 4.3.1的jquery.jqGrid.min.js中,p被重命名爲f,因此必須使用groupOps:f.groupOps

你怎麼能在the demo看到高級搜索對話框中的分組操作將應用此修復程序後進行本地化:

enter image description here

如果您的本地化的版本grid.locale-XX.js不包含文本,供與和或操作可以設置有手動

$.jgrid.search.groupOps = [ 
    {op: "My And", text: "my AND operation"}, 
    {op: "My Or", text: "my OR operation"} 
]; 

看到the next demo

enter image description here

沒有描述的錯誤修復,你可以按照收盤問題從the answer我的建議。

已更新:我發佈了the corresponding bug報告給trirand。我希望修補程序將包含在jqGrid的主代碼中。

已更新2:錯誤修正已包含在jqgrid的the main code中(請參閱here)。

+0

非常感謝。它的工作 – Andrus 2012-03-12 17:34:24

+0

@安德魯斯:不客氣! – Oleg 2012-03-12 17:37:51