* Please note this feature is not available in Lite and Basic versions.
- Parameters:
- $col_name: Name of the column. Its value is used as the left operand for comparison.
- $condition: comparison condition that compares given left and rigth hand operand with comparison operator . e.g. ” > 10 “; ” = ‘abc'”; ” != true ” etc.
- $formatoptions: an array stores CSS style format options. The value can be text, HTML, or even CSS class. See example.
- TCellValue: value to display when condition is True
- FCellValue: value to display when condition is False
- $col_name: Name of the column. Its value is used as the left operand for comparison.
- Description:
- It formats and displays value in a cell when specified condition is met. You can think it as a simplified version to set_conditional_format() method.
- Remark:
- The condition is not “stackable” for a single column. In other words, only one condition can be applied to any giving column.
- Example:
Note that tstyle and fstyle are CSS styles used as the formatoptions.
1 2 3 4 5 6 7 8 | .tstyle { display:block;background-image:none;margin-right:-2px;margin-left:-2px;height:14px;padding:5px;background-color:green;color:navy;font-weight:bold } .fstyle { display:block;background-image:none;margin-right:-2px;margin-left:-2px;height:14px;padding:5px;background-color:yellow;color:navy } |
PHP Code