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