The filtering event handler is a function that is called before the filtering operation is started. For example, you can use this event to change a filtering condition before a filter will be applied to the data. This event is cancellable.
Syntax
Javascript (Usage) | |
---|
$(function () {
// Set filtering event handler function
$(".selector").wijgrid({
filtering : function (e, args) {
}
});
});
|
Parameters
- e
- The jQuery.Event object.
- args
- The data with this event.
Example
// Prevents filtering by negative values
$("#element").wijgrid({
filtering: function (e, args) {
if (args.column.dataKey == "Price" && args.value < 0) {
args.value = 0;
}
}
});
See Also
Reference
options type
wijgrid jQuery Widget