RealGrid2 API
Interface
ColumnHeader

ColumnHeader

Setting information model for column headers displayed in the grid header area

Signature:

export interface ColumnHeader extends ColumnObject

Extends: ColumnObject

Remarks

Used in GridColumn.header.

[Superclass]

ColumnObject

Example

let col = grid.columnByName('col1')
col.header.checkLocation = 'leftEdge';

Properties

PropertyTypeDescription
checkLocationColumnHeaderItemLocationPosition of checkbox based on header string
exportStyleNamestringStyle name to be applied when exported to Excel
itemGapnumberSpacing between header string and image or checkbox
itemOffsetnumberSpace between images or checkboxes and cell boundaries
localeTextConfigObjectUse when using multiple languages.
showTooltipbooleanTooltip visibility
styleNamestringstyle class name
templateCallbackRealizeHeaderCallbackUsed to replace and display a specific string in ColumnObject.template
templateEventsHeaderTemplateEvent | HeaderTemplateEvent[]Used when setting an event on an element added with ColumnObject.template
textstringString to be displayed in column header
tooltipstringTooltip message to display
tooltipEllipsisOnlyboolean

Whether to display tooltips for cells in ellipsis state

If set to true, tooltips will be displayed for cells in ellipsis state even if grid.header.tooltipEllipsisOnly is not set.

useCheckImagebooleanDisplays the check box in the header using an image.

Properties Desc

checkLocation

Position of checkbox based on header string

Type - ColumnHeaderItemLocation


exportStyleName

Style name to be applied when exported to Excel

Type - string


itemGap

Spacing between header string and image or checkbox

Type - number


itemOffset

Space between images or checkboxes and cell boundaries

Type - number


localeText

Use when using multiple languages.

Type - ConfigObject

Example:

gridView.setColumns([
 { fieldName: "fieldName",
 name: "columnName",
 text: "Default",
 localeText: {
 "ko": "Korea",
 "en": "English",
 "en-CA": "English-Canada"
 }
 }
])

showTooltip

Whether to display tooltips

Type - boolean

Remarks:

If grid.header.showTooltip is undefined, the tooltip is displayed only in columns where column.header.showTooltip is true. If grid.header.showTooltip is true, the tooltip of the column for which column.header.showTooltip is undefined or true is displayed. If grid.header.showTooltip is false, it is not displayed.


styleName

style class name

Type - string


templateCallback

Used to replace and display a specific string in ColumnObject.template

Type - RealizeHeaderCallback

Remarks:

Called if the string is not in values.


templateEvents

Used when setting an event to an element added with ColumnObject.template

Type - HeaderTemplateEvent | HeaderTemplateEvent[]


text

String to be displayed in column header

Type - string

Remarks:

If this value is null, the data field name connected to the column is displayed. If the data field is not connected, the name of the column is displayed.


tooltip

Tooltip message to display

Type - string

Remarks:

If not specified, text is displayed.


tooltipEllipsisOnly

Whether to display tooltips for cells in ellipsis state

If set to true, tooltips will be displayed for cells in ellipsis state even if grid.header.tooltipEllipsisOnly is not set.

Type - boolean


useCheckImage

Displays the checkbox in the header using an image.

Type - boolean