{/* Do not edit this file. It is automatically generated by API Documenter. */}


## ColumnStyleObject

One of the style models that must be returned when changing the cell style with [CellStyleCallback](/refs/realgrid#cellstylecallback)

**Signature:**

```typescript
export interface ColumnStyleObject
```

## Remarks

Used in [GridBase.setCellStyleCallback()](/refs/Class/GridBase#setcellstylecallback) or [ValueColumn.styleCallback](/refs/Interface/ValueColumn#stylecallback).

## Example


```js
// Apply per column
let column = gridView.columnByName('Company');

const f = function (grid, cell) {
      return {
          styleName: 'custom-column'
      }
}
column.styleCallback = f;

// Apply to each data cell
gridView.setCellStyleCallback(f);
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [booleanFormat](/refs/Interface/ColumnStyleObject#booleanformat) | string | When the value is of type Boolean, Format |
| [button](/refs/Interface/ColumnStyleObject#button) | [CellButton](/refs/realgrid#cellbutton) | Specifies the type of CellButton to be displayed in the cell. |
| [buttonWidth](/refs/Interface/ColumnStyleObject#buttonwidth) | number | Change the width of CellButton. |
| [cellProtectProps](/refs/Interface/ColumnStyleObject#cellprotectprops) | [CellProtectProperties](/refs/Interface/CellProtectProperties) | When exporting to Excel, set to lock cells or hide formulas. |
| [datetimeFormat](/refs/Interface/ColumnStyleObject#datetimeformat) | string | When the value is in date format, Format |
| [editable](/refs/Interface/ColumnStyleObject#editable) | boolean | Editable with editor |
| [editor](/refs/Interface/ColumnStyleObject#editor) | [CellEditor](/refs/Interface/CellEditor) \| [ConfigObject](/refs/realgrid#configobject) | Editor |
| [excelFormat](/refs/Interface/ColumnStyleObject#excelformat) | string | Specify the format when exporting to Excel. |
| [exportStyleName](/refs/Interface/ColumnStyleObject#exportstylename) | string | Style name to be applied when exported to Excel |
| [numberFormat](/refs/Interface/ColumnStyleObject#numberformat) | string | When the value is in numeric format, Format |
| [prefix](/refs/Interface/ColumnStyleObject#prefix) | string | Text to be displayed in front of the value |
| [readOnly](/refs/Interface/ColumnStyleObject#readonly) | boolean | Modification possible or prohibited |
| [renderer](/refs/Interface/ColumnStyleObject#renderer) | [CellRenderer](/refs/Interface/CellRenderer) \| [ConfigObject](/refs/realgrid#configobject) | renderer |
| [style](/refs/Interface/ColumnStyleObject#style) | Partial&lt;CSSStyleDeclaration&gt; | Used when specifying inline-style. |
| [styleName](/refs/Interface/ColumnStyleObject#stylename) | string | style name |
| [suffix](/refs/Interface/ColumnStyleObject#suffix) | string | Text to be added to the end of the value |
| [text](/refs/Interface/ColumnStyleObject#text) | string | text to be displayed in the cell instead of data |
| [textFormat](/refs/Interface/ColumnStyleObject#textformat) | string | When the value is in text format, Format |

## Properties Desc

### booleanFormat

Formatting when the value is of type Boolean

`Type` - string

**Remarks:**

If this value is specified, it is used as a conversion format when outputting the value of a boolean field.

If not specified, the value set in the data field is used.

Separated with a colon (:) or semicolon (;), the left side is `false`{/* */}, and the right side is `true`{/* */}.

Example) `'Nub: Yub'`

<hr/>

### button

Specifies the type of CellButton to be displayed in the cell.

`Type` - [CellButton](/refs/realgrid#cellbutton)

<hr/>

### buttonWidth

Change the width of CellButton.

`Type` - number

<hr/>

### cellProtectProps

When exporting to Excel, set to lock cells or hide formulas.

`Type` - [CellProtectProperties](/refs/Interface/CellProtectProperties)

**Remarks:**

If not specified, [DataColumn.cellProtectProps](/refs/Interface/DataColumn#cellprotectprops){/* */} is applied. Use with [GridExportOptions.sheetProtect](/refs/Interface/GridExportOptions#sheetprotect){/* */}.

<hr/>

### datetimeFormat

Format when the value is in date format

`Type` - string

<hr/>

### editable

Can be edited with editor

`Type` - boolean

<hr/>

### editor

editor

`Type` - [CellEditor](/refs/Interface/CellEditor) \| [ConfigObject](/refs/realgrid#configobject)

<hr/>

### excelFormat

Specify the format when exporting to Excel.

`Type` - string

**Remarks:**

If not specified, [DataColumn.excelFormat](/refs/Interface/DataColumn#excelformat) or format according to dataType is applied.

<hr/>

### exportStyleName

Style name to be applied when exported to Excel

`Type` - string

<hr/>

### numberFormat

Format when the value is in numeric format

`Type` - string

<hr/>

### prefix

Text to display in front of the value

`Type` - string

<hr/>

### readOnly

Editable or prohibited?

`Type` - boolean

<hr/>

### renderer

renderer

`Type` - [CellRenderer](/refs/Interface/CellRenderer) \| [ConfigObject](/refs/realgrid#configobject)

<hr/>

### style

Used when specifying inline-style.

`Type` - Partial&lt;CSSStyleDeclaration&gt;

**Remarks:**

Specifies properties to add to the style of `td`{/* */}.

<hr/>

### styleName

style name

`Type` - string

<hr/>

### suffix

Text to be added to the end of the value

`Type` - string

<hr/>

### text

데이터 대신 셀에 표시될 text

`Type` - string

**Remarks:**

[DataColumn.lookupDisplay](/refs/Interface/DataColumn#lookupdisplay) 또는 [DataColumn.displayCallback](/refs/Interface/DataColumn#displaycallback) 보다 먼저 적용된다.

<hr/>

### textFormat

Formatting when the value is in text format

`Type` - string

<hr/>