The beforeCellEdit event handler is a function that is called before a cell enters edit mode.
The beforeCellEdit event handler assists you in appending a widget, data, or other item to a wijgrid's cells before the cells enter edit mode. This event is cancellable if the editigMode options is set to "cell".
Syntax
Javascript (Usage) | |
---|
$(function () {
// Set beforeCellEdit event handler function
$(".selector").wijgrid({
beforeCellEdit : function (e, args) {
}
});
});
|
Parameters
- e
- The jQuery.Event object.
- args
- The data with this event.
Example
// Allow the user to change the price only if the product hasn't been discontinued:
$("#element").wijgrid({
beforeCellEdit: function(e, args) {
return !((args.cell.column().dataKey === "Price") && args.cell.row().data.Discontinued);
}
});
See Also
Reference
options type
wijgrid jQuery Widget