1
我正在使用啓用了工具欄搜索的jqGrid。我已將我的搜索選項配置爲'eq'
。但是,當我在搜索欄上輸入十進制數時,不會顯示有效記錄。jqGrid工具欄在小數點上搜索
例如: 當我輸入12
時,記錄與12.00
顯示,這是正確的。 當輸入12.50
時,12.50
的記錄不顯示,這是不正確的。
我用sorttype
作爲編號進行了實驗,編號爲formatter
,但有小數位,但我似乎無法使其工作。
電網定義:
$("#productListingGrid").jqGrid({
datastr: products,
datatype: 'jsonstring',
jsonReader: {
root: 'products',
repeatitems: false,
cell: 'products.branches',
id: 'productNumber'
},
loadonce: true,
// -1 no longer works: https://github.com/tonytomov/jqGrid/issues/317
rowNum: 10000,
height: 580,
width: 1250,
colNames: columnNames,
colModel: columnModel,
sortname: 'productNumber',
sortorder: "asc",
caption: 'PRODUCT LIST',
headertitles: true,
altRows: true,
altclass: 'gridStripe',
gridview: true,
footerrow: true,
ignoreCase: true,
shrinkToFit: false
});
我列模型定義:
{ name: 'totalValue' , width:55, align:'right', formatter: 'currency', searchoptions:{sopt:['eq']} }
代碼以啓用該工具欄的搜索:
grid.jqGrid('filterToolbar', {searchOnEnter: false});
我想知道這是否是一個電流限制?
非常感謝。
注: 我目前使用下列內容:
jQuery - 1.9.1
jQuery UI - 1.10.2
jqGrid - 4.4.5
你可以添加一些你使用的JavaScript代碼嗎? – Oleg
@Oleg我添加了一些代碼。你需要看什麼具體的東西? – Paul
@Oleg我已經通過設置sorttype工作了!我會發布答案。 – Paul