0

我有一个选择类型,其值如下。sopt 是“cn”,所以当我选择“已批准”时,它也会给我“未批准”的结果,我怎样才能获得完全匹配的结果,即已批准为已批准,未批准为未批准等。下面是代码:

var categories = ["All", "Approved", "Not Approved", "Pending"]; var categoriesStr = ":All;Approved:Approved;Not Approved:Not Approved;Pending:Pending"; var defaultCategory = "All";

{name:'Status',index:'Status', width: 85, stype: 'select', sortable:false, searchoptions: { sopt: ['cn'], dataInit:function(el){ var defOption = $("option:contains("+defaultCategory+")",el); defOption.attr("selected", "selected"); setTimeout(function(){ $(el).trigger('change'); },500); } }, edittype:'select', editoptions: { value: categoriesStr } }

4

1 回答 1

0

迪普蒂!

您可以使用“eq”运算符。这匹配等于下拉值的所有值。

于 2012-09-01T21:13:45.693 回答