wijmo.grid.wijgrid Namespace > options type : cellStyleFormatter Option |
This function is called each time wijgrid needs to change cell appearence, for example, when the current cell position is changed or cell is selected. Can be used for customization of cell style depending on its state.
Javascript (Usage) | |
---|---|
$(function () { // Get value var returnsValue; // Type: any returnsValue = $(".selector").wijgrid("option", "cellStyleFormatter"); // Set value var newValue; // Type: any $(".selector").wijgrid("option", "cellStyleFormatter", newValue); }); |
Javascript (Specification) | |
---|---|
|
// Make the text of the current cell italic. $("#element").wijgrid({ highlightCurrentCell: true, cellStyleFormatter: function(args) { if ((args.row.type & wijmo.grid.rowType.data)) { if (args.state & wijmo.grid.renderState.current) { args.$cell.css("font-style", "italic"); } else { args.$cell.css("font-style", "normal"); } } } });