RealGrid2 API
Interface
DataColumn

Column information model inherited from DataColumn

ValueColumn

Signature:

export interface DataColumn extends ValueColumn 

**Extend s: ** ValueColumn

Remarks

Contains additional sorting, filtering, group information, etc.

[Superclass]

GridColumn - ValueColumn

Events

PropertyTypeDescription
displayCallbackDisplayCallbackA callback to set the value displayed on the screen
mergeCallbackMergeCallbackCallback for the user to specify values ​​needed for the merge.
objectCallbackColumnObjectCallbackCallback to set the value displayed on the screen when the dataType of the field is object

Properties

PropertyTypeDescription
autoFilterbooleanWhether to apply automatic filtering
autoFiltersColumnFilterCollectionAutomatically created filters
breakMergeOnEmptybooleanWhether to stop merging when there is an empty cell
buttonCellButtonType of button to display on the right side of data cell
buttonWidthnumberwidth of button
cellProtectPropsCellProtectPropertiesSet to lock cells or hide formulas when exporting to Excel.
defaultValueanyinitial value
displayTextstringtext displayed in header/export/feedback;
editablebooleanEditability
equalBlankbooleanWhether to bundle cells when the value is the same as the cell in the previous row of the same column
equalBlankExpressionstringFormula to be treated as the same value if equalBlank is true
equalBlankLinebooleanWhether to display the bottom line of a cell when the value is the same as the previous row
equalBlankTextstringstring displayed when the value is the same as the previous row
excelFormatstringFormat displayed when exporting to Excel
excelFormulaStatementstringFormula displayed when exporting to Excel
fieldIndexnumberIndex of the field represented by the column
fieldNamestringName of the data field represented by the column
filterablebooleanFilterability
filterIconVisiblebooleanFilter Icon Visibility
filtersColumnFilterCollectionFilters
filterSelectorWidthnumberWidth of filter selection window
groupablebooleanIf set to true, the user can group the column header by dragging it with the mouse.
groupLevelnumberGroup order number of rowGroup.
hasFiltersbooleanCheck whether there is a filter in the column.
labelFieldstringA field that specifies the list of values to be displayed in the column cell
labelsstring[]List of values to be displayed in column cells
lookupDataConfigObject | ConfigObject[]Set values and labels.
lookupDisplaybooleanWhether to display the value of the labels item at the position corresponding to the value of the cell in the values list in the column cell
lookupKeyFieldsstring[]lookupKeyFields
lookupSourceIdstringID of registered lookupSourceTree
mergeEditbooleanWhen editing a merged cell, all merged rows are changed.
mergeRulestring | { criteria: string; }Column merge rules
nanTextstringText displayed if value is NaN
objectKeystringIf the dataType of the field is object, name you want to show on the screen
placeHolderstringString displayed when there is no cell data
placeHolderStyleNamestringClass name applied when there is no cell data
readOnlybooleanreadOnly or not
requiredbooleanRequired or not
requiredLevelValidationLevelLevel to be displayed when value is requested during validation
requiredMessagestringMessage generated when a value is requested during verification
showInlineFilterbooleanWhether to display input window of filterPanel
sortablebooleanSortability
sortByLabelbooleanSort by Label
sortDirectionSortDirectionSort by
sortOrdernumberSort Order
taganyRandom value specified by user
textOfInvalidstringText displayed if cell data is not in lookup values
type"data"type of column
validationsEditValidationCollectionList of EditValidation to apply to this column
valuesstring[]List of actual values in column cells
valueTypeValueTypedataType of the data field associated with the column
zeroTextstringText displayed when value is 0

Methods

MethodTypeDescription
activateAllFilters(active)activateAllFilters?(active: boolean): void;Changes the active status of the filter registered in filters to the entered value.
activateFilters(filterNames, active)activateFilters?(filterNames: string | string[], active: boolean): void;Changes the active status of the filter specified in filters.
addFilters(filters, overwrite)addFilters?(filters: (ColumnFilter | ConfigObject) | (ColumnFilter | ConfigObject)[], overwrite?: boolean): void;Add filter to filters.
autoFilterRefresh(applyFilters)autoFilterRefresh?(applyFilters: boolean): void;When autoFilter is true, filter information is updated.
clearFilters()clearFilters?(): void;Delete and initialize the filter registered in filters.
getActiveFilters(active)getActiveFilters?(active: boolean): ColumnFilter[];Retrieves the entered filters that are in the active state.
getFilter(filterName)getFilter?(filterName: string): ColumnFilter;Gets the column filter object.
hideAllColumnFilters(hide)hideAllColumnFilters?(hide: boolean): void;Hide or display all filters in a column.
hideColumnFilters(filterNames, hide)hideColumnFilters?(filterNames: string | string[], hide: boolean): void;Makes the specified filter invisible in the filter selector. Even in the hide state, the active state of the filter is applied to the grid.
isFiltered()isFiltered?(): boolean;

Check whether the column is being filtered.

[Return value] boolean

removeFilters(filterNames)removeFilters?(filterNames: string | string[]): void;Remove filter from filters.
setFilters(filters)setFilters?(filters: (ColumnFilter | ConfigObject)[]): void;Set a filter on the column.
toggleAllFilters()toggleAllFilters?(): void;Toggle the active status of all filters in the column.
toggleFilters(filterNames)toggleFilters?(filterNames: string | string[]): void;Toggle the active status of the specified filter.

Event Desk

displayCallback

Callback to set the value displayed on the screen

Type - DisplayCallback


mergeCallback

A callback for the user to specify the values ​​needed for merging.

Type - MergeCallback

Remarks:

The grid uses the returned value to determine whether to merge with the cell of the previous row.


objectCallback

Callback to set the value displayed on the screen when the dataType of the field is object

Type - ColumnObjectCallback


Properties Desc

autoFilter

Whether to apply automatic filtering

Type - boolean


autoFilters

Automatically created filters

Type - ColumnFilterCollection

Remarks:

It is updated when autoFilter is true and the filterIcon is clicked. Or update using GridBase.autoFiltersRefresh().


breakMergeOnEmpty

Whether to stop merging when there is an empty cell

Type - boolean


button

Type of button to display on the right side of data cell

Type - CellButton


buttonWidth

width of button

Type - number


cellProtectProps

Set to lock cells or hide formulas when exporting to Excel.

Type - CellProtectProperties

Remarks:

Use with GridExportOptions.sheetProtect.


defaultValue

initial value

Type - any

Remarks:

This is the default value for the column when inserting or appending.


displayText

text displayed in header/export/feedback;

Type - string


editable

Editable?

Type - boolean

Remarks:

If the editable of the column is undefined, the editable of GridBase.editOptions is followed.

If true, the column is editable, and if false, the grid editor is not activated.


equalBlank

Whether to bundle cells when the value is the same as the cell in the previous row of the same column

Type - boolean

Remarks:

Unlike mergeRule, it does not merge cells and only shows text.


equalBlankExpression

Formula to be treated as the same value if equalBlank is true

Type - string


equalBlankLine

Whether to display the bottom line of a cell when the value is the same as the previous row

Type - boolean


equalBlankText

String displayed when the value is the same as the value in the previous row

Type - string


excelFormat

Format displayed when exporting to Excel

Type - string

Remarks:

Example) excelFormat: #,##0;[Red]- #,##0;-


excelFormulaStatement

Formula displayed when exporting to Excel

Type - string

Remarks:

Example) excelFormulaStatement: '${excelcolumn[‘column 1’]}${row} + ${excelcolumn[‘column 2’]}${row}’


fieldIndex

Index of the field represented by the column

Type - number


fieldName

The name of the data field represented by the column

Type - string

Remarks:

If you specify or do not specify a field name that does not exist, the cell corresponding to this column will not display anything.


filterable

Is filtering possible?

Type - boolean


filterIconVisible

Filter icon display status

Type - boolean


filters

filters

Type - ColumnFilterCollection

Remarks:

When returning, it only follows the ColumnFilterCollection model, but when setting, it is the same as the parameter format of GridBase.setColumnFilters().


filterSelectorWidth

Width of filter selection window

Type - number

Remarks:

Specifies the width of the filter selection window.


groupable

If set to true, the user can group the column header by dragging it with the mouse.

Type - boolean


groupLevel

Group order number of rowGroup.

Type - number

Remarks:

The groupLevel of the field referenced by the column when in rowGroup state.


hasFilters

Check whether there is a filter in the column.

Type - boolean


labelField

A field that specifies the list of values to be displayed in the column cell.

Type - string

Remarks:

If labelField is specified as another field, the value of labelField in the same row as the cell of this field is displayed in the corresponding column cell instead of the actual value. The labelField property takes precedence over the values and labels properties.


labels

List of values to be displayed in column cells

Type - string[]

Remarks:

If there is no item corresponding to the cell value in values, the cell value is displayed as is.


lookupData

Set values and labels.

Type - ConfigObject | ConfigObject[]

Remarks:

It is used to set values and labels after retrieving code information from the server in map form.

Example:

var col = grid.columnByName("column");
var codeInfo = {
 "type": "areacode",
 "list": [
 {code:"11", text:"Seoul"},
 {code:"21", text:"Busan Metropolitan City"}
 ]
}
col.lookupData = codeInfo;
 
// When setting as an array.
var codeList = [
 {code:"11", text:"Seoul"},
 {code:"21", text:"Busan Metropolitan City"}
 ...
];
col.lookupData = codeList;

lookupDisplay

Whether to display the value of the labels item at the position corresponding to the value of the cell in the values list in the column cell.

Type - boolean


lookupKeyFields

lookupKeyFields

Type - string[]

Remarks:

Names of fields to retrieve preceding values when displaying lookup using lookupSourceTree


lookupSourceId

ID of registered lookupSourceTree

Type - string


mergeEdit

When editing a merged cell, all merged rows are changed.

Type - boolean

Remarks:

If true, if a cell merged by mergeRule or mergedRowGrouping is modified, the entire merged row is modified. commitByCell must be true.


mergeRule

Column Merge Rules

Type - string | { criteria: string; }

Remarks:

Cells belonging to a column can be grouped and displayed. Set a formula to determine whether to merge with cells in the previous row. The {criteria: string} format is used for compatibility with previous versions.


nanText

Text displayed if value is NaN

Type - string

Remarks:

Only possible if dataType is numeric


objectKey

If the dataType of the field is object, name to be displayed on the screen

Type - string

Remarks:

objectKey is specifiedIf so, the corresponding name can be edited.


placeHolder

String displayed when there is no cell data

Type - string

Remarks:

If there is no data, the corresponding string is displayed.


placeHolderStyleName

Class name applied when there is no cell data

Type - string


readOnly

readOnly or not

Type - boolean

Remarks:

If true, the grid editor is activated, but editing is not possible.


required

Required?

Type - boolean


requiredLevel

Level to display when value is requested during verification

Type - ValidationLevel


requiredMessage

Message generated when a value is requested during verification

Type - string


showInlineFilter

Whether to display input window of filterPanel

Type - boolean

Remarks:

If FilterPanel.showInput is false, only column.showInlineFilter is true is displayed.


sortable

Sort possible

Type - boolean

Remarks:

If false, it is not sorted even if you click on the column header.


sortByLabel

Sort by label

Type - boolean


sortDirection

sorting method

Type - SortDirection


sortOrder

sort order

Type - number


tag

Random value specified by user

Type - any

Remarks:

You can get it using columnByTag or columnsByTag.


textOfInvalid

Text displayed if cell data is not in lookup values

Type - string

Remarks:

If you specify a string, that string is displayed.


type

type of column

Type - "data"


validations

List of EditValidation to apply to this column

Type - EditValidationCollection

Remarks:

When returning, it follows the EditValidationCollection model, but when setting, it is the same as the parameter format of GridBase.setValidations().


values

List of actual values in column cells

Type - string[]

Remarks:

If there is no item corresponding to the cell value in values, the cell value is displayed as is.


valueType

dataType of the data field associated with the column

Type - ValueType


zeroText

Text displayed when value is 0

Type - string

Remarks:

Only possible if dataType is numeric


Method Desc

activateAllFilters

Changes the active status of the filter registered in filters to the entered value.

[Parameter List]

active - boolean

boolean

[Return Value] - void


activateFilters

Changes the active status of the filter specified in filters.


addFilters

Add filter to filters.

[Parameter List]

filters - (ColumnFilter | ConfigObject) | (ColumnFilter | ConfigObject)[]

array of filter objects

overwrite - boolean

If filterName exists, overwrite defaultValue false

[Return Value] - void

Remarks:

Register a filter in the column.


autoFilterRefresh

When autoFilter is true, filter information is updated.


clearFilters

Delete and initialize the filter registered in filters.


getActiveFilters

Retrieves the entered filters that are in the active state.

[Parameter List]

active - boolean

boolean;

[Return Value] - ColumnFilter[]


getFilter

Gets the column filter object.


hideAllColumnFilters

Hide or display all filters in a column.

[Parameter List]

hide - boolean

boolean;

[Return Value] - void


hideColumnFilters

Makes the specified filter invisible in the filter selector. Even in the hide state, the active state of the filter is applied to the grid.

[Parameter List]

filterNames - string | string[]

Array of name of filter to hide or show

hide - boolean

boolean;

[Return Value] - void


isFiltered

Check whether the column is being filtered.

[return value] boolean


removeFilters

Remove filter from filters.


setFilters

Set a filter on the column.

[Parameter List]

filters - (ColumnFilter | ConfigObject)[]

filter setting information array

[Return Value] - void

Example:

var col = gridView.columnByName("areacode");
var filters = [{
 name:"Seoul",
 criteria:"value = '11'",
 active: true
}, {
 name:"Busan",
 criteria:"value = '21'",
 text:"Busan Metropolitan City",
 active: false
}];
col.setFilters(filters);

toggleAllFilters

Toggle the active status of all filters in the column.


toggleFilters

Toggle the active status of the specified filter.

[Parameter List]

filterNames - string | string[]

Names of the filter whose active state you want to change

[Return Value] - void