Wijmo UI for the Web
cellStyleFormatter Field
This function is called each time wijgrid needs to change cell appearence, for example, when the current cell position is changed or the cell is selected. You can also use it to customize the cell style depending on its state.
Syntax
Javascript (Usage) 
var value; // Type: any
value = jQuery.wijmo.wijgrid.options.cellStyleFormatter;
Javascript (Specification) 
var cellStyleFormatter : any;
Example
// 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");
            }
        }
    }
});
Remarks
When the args.state parameter is equal to wijmo.grid.renderState.rendering, this means that the cell is being created. At this moment you can apply general formatting to it independent of any particular state, like "current" or "selected."
Browser Compatibility
7
5
5

See Also

Reference

options type

 

 


© 2013 All Rights Reserved.

Send comments on this topic.