I would like to provide "Empty", "Not Empty", "Contains", "Range" conditions for a column to filter data.
Range is not working since ui.value is array. ui.value is null .
{
title: "UsageCategory", dataIndx: "UsageCategories",
filter: {
type: 'select',
attr: "multiple",
style: "height:5px;",
condition: 'range',
prepend: {'empty': '[Empty]', 'notempty': '[NotEmpty]' },
value: [],
cache: null,
valueIndx: "UsageCategories",
labelIndx: "UsageCategories",
listeners: [{
'change': function (evt, ui) {
console.log("ui.value");
console.log(ui.value);
$(this)
.closest(".pq-grid")
.pqGrid("filter",
{
oper: 'add',
data: [
{
dataIndx: ui.dataIndx,
condition: ui.value != null && (ui.value.indexOf("empty") > 0 ? "empty" : ui.value.indexOf("notempty") > 0 ? "notempty" : "range"),
value: ui.value
}
]
});
}
}],
init: function () {
$(this).pqSelect({ checkbox: true, radio: true, width: '100%' });
}
}
},