realgrid package
Classes
Class | Description |
---|---|
GridView | GridView class, a child class of GridBase. |
LocalDataProvider | LocalDataProvider class. Inherits DataProviderBase. |
LocalTreeDataProvider | LocalTreeDataProvider class. Inherits DataProviderBase. |
RealGrid | RealGrid main class |
TreeView | It is a child class of the TreeView class, GridBase. |
Abstract Classes
Abstract Class | Description |
---|---|
CustomCellRendererImpl | It is a parent class of user-defined renderer. |
DataProviderBase | Base class for LocalDataProvider and LocalTreeDataProvider |
GridBase | GridBase is the base class of GridView and TreeView. |
Enumerations
Enumeration | Description |
---|---|
BarOrigin | Bar position in BarCellRenderer |
ButtonVisibility | How to display the column button and edit button in the data cell when a button is set in the column |
CalendarMode | Set limits on the year, month, and day selection screen. |
CellButton | Type of button to display on the right side of data cell |
CellLayoutType | Specifies the type of layout. |
ColumnHeaderItemLocation | Position type of image or check box in column header |
ColumnLayoutDirection | Placement direction when setting Cell Layout |
DataDropMode | Mode when data drop |
DataFillMode | How to populate data |
DefaultShowDate | When using the calendar editor, the date types displayed on the calendar |
DragFeedbackStyle | Style of feedback that shows the drop position when the mouse is over |
DropDownPosition | A list of DropDownCellEditor or a calendar of DateCellEditor, BTDateCellEditor Position of selection box |
DropDownSortStyle | DropDownCellEditor How to sort the list |
DropDownValueLabel | How to show the list of DropDownCellEditor |
EdgeMark | edgeMark |
ExitGridWhenTab | Conditions for leaving the grid when entering a tab Can be set in EditOptions.exitGridWhenTab. |
ExpanderVisibility | Whether to display Expander when grouping rows |
ExpandWhenSetData | Sets whether to maintain the existing expansion after setting data. |
ExportCompression | Whether to compress when creating a file |
ExportLayoutExpand | When exporting a layout with layout Expandable set to true to Excel |
ExportTarget | Destination when exporting grid to external document |
ExportType | Types of exporting grids to external documents |
FilterMode | Filter operation mode after data modification |
FocusMoveStep | How to move focus when inputting the left or right arrow when there is a columnGroup |
FocusType | Display focus in layer form or display only borders. Can be set in DisplayOptions.focusType. |
GridCellType | Grid cell types |
GridFitStyle | Constants that control how columns are displayed |
GroupShowMode | Determines whether the group column will be displayed when collapsed or expanded. Set in CellLayoutItem.groupShowMode. |
HandleVisibility | How to display handles |
IconLocation | Location of icons, checkboxes, shapes, etc. to be rendered |
IndicatorValue | Type of content to be displayed on indicator |
InlineFilterOperator | This is the type of operator that can be used in FilterPanel. |
ItemState | Condition of item |
ItemType | Types of items in grid |
LayoutDirection | Item placement direction |
MenuItemType | Types of menu items displayed in PopupMenu, etc. |
NullsOrder | When sorting, place undefined, null [SortingOptions.nullsOrder](/refs/Interface Set in /SortingOptions#nullsorder). |
PolygonShape | List of shapes available in ShapeCellRenderer |
RefreshMode | Constants needed when redrawing the grid |
RestoreMode | Restoration Mode Type |
RowGroupAdornments | row groupHow to display header or footer when in state |
RowMaskType | Display type of selected row (row mask type) |
RowState | status of row |
ScrollOnEditing | Processing status when scrolling while editing |
SelectionDisplay | Cell Selection Display |
SelectionMode | Mode for cell selection |
SelectionStyle | Styles for cell selection |
SortCase | case sensitive type |
SortDirection | Sort by |
SortMode | Sort operation mode after data modification |
SortStyle | Sort type when clicking on grid column header |
StateMark | How to display status in status bar |
SummaryMode | How to calculate the sum of each column in a grid |
SummaryType | Type for calculating the total value of a field |
SyncGridHeight | Change the height of the grid so that all searched data can be seen. |
TextInputCase | uppercase and lowercase letters |
TimeSelectType | |
TreeExpanderIconStyle | Specifies the style of the default icon displayed in Tree Expander. |
UserFilterPosition | Position of user filter when showing autoFilter and user filter at the same time |
ValidationLevel | Data verification result level |
ValidationMode | Verification method |
ValueType | Data type of data field |
VerticalMoveStep | How to move focus when an up or down arrow is entered in a subcolumn of a ColumnGruop whose direction is vertical . |
Interfaces
Interface | Description |
---|---|
ActualTargetBulletRenderer | Series renderer that compares and displays the target value (or expected value) stored in two data fields and the execution value. The Bullet renderer displays the target value as a vertical bar and the execution value as a horizontal bar. Available only in SeriesColumn. [Superclass] [CellRenderer](/refs/ Interface/CellRenderer) |
ActualTargetTextRenderer | Renderer to compare and display the target value (or expected value) stored in two data fields and the actual value. The ActualTarget text renderer displays in the format of 'execution value / target value'. . Available only in SeriesColumn. [Superclass] [CellRenderer](/refs /Interface/CellRenderer) |
BarCellRenderer | Renderer that displays the value of a numeric column cell as a bar |
BTDateCellEditor | Editor using BootStrap DatePicker |
ButtonCellRenderer | Renderer that displays a button |
CellEditor | Model on which cell editors are based |
CellIndex | Cell location information model |
CellLayoutColumnItem | Column Layout Information Model |
CellLayoutGroupHeader | Configuration information model for CellLayoutGroupItem.header [Parent class] [CellLayoutHeader](/refs/Interface/ CellLayoutHeader) |
CellLayoutGroupItem | Group Layout Information Model |
CellLayoutHeader | Setting information model of cell layout header |
CellLayoutItem | Base model for setting up layout |
CellMemo | Memo information model for cells |
CellProtectProperties | Set cell lock or cell hiding. |
CellRenderer | Base model for cell renderers |
CheckBar | Configuration model related to checkbar |
CheckCellRenderer | A renderer that indicates whether a value is true or false |
ClickData | Information model of clicked item |
Code128CellRenderer | Renderer displaying Code128 Barcode |
Code39CellRenderer | Renderer displaying Code39 Barcode |
ColumnFilter | Setting information related to column filtering |
ColumnFilterCollection | Collection model of ColumnFilter |
ColumnFooter | Setting information for column footers displayed in the grid footer area |
ColumnFooterCollection | Collection of ColumnFooter |
ColumnHeader | Setting information model for column headers displayed in the grid header area |
ColumnHeaderSummary | Setting information of ColumnSummary displayed in grid header area |
ColumnHeaderSummaryCollection | Collection of ColumnHeaderSummary |
ColumnLayoutInfo | If the set layout is the CellLayoutColumnItem model, the object returned by GridBase.saveColumnLayout() |
ColumnObject | Base class for column-related classes |
ColumnStyleObject | One of the style models that must be returned when changing the cell style with CellStyleCallback |
ColumnSummary | Base classes such as ColumnFooter, ColumnHeaderSummary |
ColumnSummaryStyleObject | One of the style models that should be returned when changing the cell style with CellStyleCallback |
CopyOptions | Configuration model for copying grid contents to clipboard |
CustomCellRenderer | Object used when setting up a custom cell renderer |
DataCell | Cell information in grid data area |
DataColumn | Column information model that inherits ValueColumn |
DataDropOptions | d in another gridSetup model for how ragged data is handled |
DataExportOptions | Setup model for export |
DataField | data field model object |
DataFieldObject | Object with the same structure as DataField used when setting |
DataFillOptions | Setting model for data retrieval |
DataFilter | Object with data filter conditions |
DataOptions | DataProviderBase overall configuration information |
DataOutputOptions | Setup model for how data is returned when output |
DateCellEditor | date editor |
DateHoliday | Holidays specified by date |
DayHoliday | Public holidays designated on days of the week |
DisplayOptions | Setting model for display information managed at grid level |
DocumentTitle | When exporting a grid using the GridExportOptions model and GridBase.exportGrid(), set the title, subtitle, and footer of the Excel document. model for |
DropDownCellEditor | Editor that allows editing with lists (dropdown editor) |
EditingItemInfo | Object type returned by GridBase.getEditingItem() |
EditMaskObject | Object type display format in the editor that can be applied to text or date fields |
EditOptions | Setup model for data editing in grid |
EditorOptions | Setting model for editor information managed at grid level |
EditResult | Output information after editing a cell used in GridBase.onGetEditValue |
EditValidation | Model for verification conditions and methods for column- or row-level data editing |
EditValidationCollection | Collection model of EditValidation |
ExportBaseOptions | Model based settings for grid and data export |
ExportCoreProperties | Grid Export Settings Properties that can specify the properties of the Excel file |
ExportMemo | A model containing settings related to validation results for a cell |
ExportOptions | Common model for grid and data export settings |
FieldMap | Field name of the grid to be moved used in DataDropOptions.fieldMap - field name of the grid to be moved pair format |
FilterAutomatingOptions | Setting information for automatic filtering |
FilterCategory | Category classification model when creating custom automatic filtering |
FilteringOptions | Setting model related to column filtering |
FilterPanel | Displays an input window for filtering using the value entered by the user under the GridHeader area. |
FilterSelectorOptions | Setting model for selection box in column filter |
FixedOptions | Setting model for fixed row and column areas in grid |
FormatOptions | Setting model for conversion format of data field values |
GridCell | |
GridColumn | Column Information Model |
GridExportOptions | Configuration model for grid export |
GridFooter | Single setup model for footer area |
GridFooterCollection | Collection model for grid footer area |
GridHeader | Setting model for header area |
GridItem | Information model of the item |
GridOptions | Grid's overall settings information |
GroupingOptions | Settings model related to row grouping |
GroupItem | Information model of group item [Parent class] As a parameter of callback Used only when delivered. |
GroupLayoutInfo | If the set layout is the CellLayoutGroupItem model, the object returned by GridBase.saveColumnLayout() |
GroupPanel | Setting information for grid Group Panel display information |
GroupSummary | Object type returned by GridBase.getGroupSummary() |
HeaderSummary | Header Summary Single configuration model for areas |
HeaderSummaryCollection | Header summary Collection model object for area |
HeaderTemplateEvent | Template event setting information for ColumnHeader or CellLayoutGroupHeader |
IconCellRenderer | Icon Renderer |
ImageCellRenderer | image renderer |
InvalidCell | Object type returned by GridBase.getInvalidCells() |
LineCellEditor | Text editor that accepts single-line input |
LinkCellRenderer | Renderer that displays hyperlinks |
LiteralColumn | Column that displays fixed values on the screen |
LookupDataKeyValues | A type of LookupData |
LookupDataRows | A type of LookupData |
LookupSource | Setting information for displaying in cells a different value associated with the data field associated with the column instead of the actual value |
MenuItem | Menu Item Related Setting Information Model |
MobileOptions | Mobile-specific settings model |
MultiCheckCellEditor | Editor that allows multiple selections from drop-down lists |
MultiCheckCellRenderer | A renderer that selects one or more than one value |
MultiLineCellEditor | An editor that can receive multi-line input. Inherits CellEditor. [Super class] |
NumberCellEditor | Editor that allows only numbers, punctuation, and symbols to be entered |
NumberFormatOptions | formatOption for displaying numbers, currency, and accounting expressed differently in each language |
PasswordCellEditor | Editor for entering passwords |
PasteOptions | Configuration model for pasting data from clipboard into grid |
PopupMenu | Setting model for a popup menu or submenu registered in the grid [Parent class] |
PopupMenuBase | This is the base class for PopupMenu and PopupMenuItem. |
PopupMenuItem | Configuration model for popup menu items displayed by right-clicking See PopupMenu [Superclass] |
RealGridLocale | Set the locale and currency for grid reference. numberFormats: [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/ (opens in a new tab) Register numberFormat using Reference/Global_Objects/Intl/NumberFormat/NumberFormat). messages: Change the grid message to suit the user environment. |
RealGridMessages | Specifies the text output from the grid. |
Rectangle | Rectangle coordinate information |
RendererEditResult | Edited result model of custom renderer |
RowGroup | Setting model for how to display areas related to row grouping, etc. |
RowGroupFooter | grid groupfooter model |
RowGroupFooterCollection | Collection model for grid group footer area |
RowIndicator | Configuration model for grid indicators |
RowStateList | List of rows according to row status |
RowStyleObject | Style model returned when changing the style of a row with RowStyleCallback |
SearchCellEditor | DropDownCellEditor with added search function |
SearchCellOptions | Flexible configuration model for cell search |
SearchCellResult | Location information of searched cell |
SearchOptions | Flexible configuration information model for row retrieval |
Selection | Grid Selection Area Information Model |
SeriesColumn | Column that displays one or more data values simultaneously |
SeriesTextCellRenderer | Renderer for displaying a Series column that displays one or more data values simultaneously as text |
ShapeCellRenderer | A renderer that displays shapes contained in a grid |
SheetProtectProperties | Specifies the properties to be allowed when applying Excel sheet protection. |
SignalBarCellRenderer | Renderer that displays cell values as signal strength |
SortedFields | return format of gridView.getSortedFields |
SortingOptions | Set model for data sorting |
SparkChartRenderer | A base model for renderers to display Spark Chart graphs |
SparkColumnRenderer | Renderer for displaying a Series column that displays one or more data values simultaneously as a Spark Column |
SparkLineRenderer | Renderer for displaying a Series column that displays one or more data values simultaneously as a Spark Line |
SparkWinLossRenderer | Renderer for displaying Series columns that display one or more data values simultaneously with Spark WinLoss |
StateBar | Setting model related to the status bar that displays the status of rows When using GridBase.setStateBar(), you only need to enter the necessary information. |
StateTexts | Types of status texts to be displayed on the status bar |
StyledCell | Cell model used to fill space among grid components |
SummaryTemplateEvent | ColumnSummary template event setting information |
TemplateCellRenderer | A renderer that displays templates in HTML format |
TemplateEvent | The format used when adding an event to an element generated by TemplateCellRenderer or ColumnObject.template |
TextCellEditor | Base model for editors that can accept text input |
TextCellRenderer | Default Text Renderer |
TooltipOptions | A configuration model for displaying messages on the screen. |
ToastOptions | Settings model that allows you to specify whether to display Toast View and a message |
TreeOptions | TreeView Setup model for display |
TreeTemplateEvent | TreeTemplateOptions template event configuration information |
TreeTemplateOptions | Configuration information for displaying html in the data area of the first column of treeView |
UpdatedCell | Changed cell information |
UpdatedRow | Changed row information |
UserExportCell | When exporting to Excel, specify additional content to be output in addition to the content output by the grid. |
ValidationError | Setting information model related to verification results |
ValueCell | It is a superclass of DataCell. |
ValueColumn | Column information model that inherits GridColumn |
ViewOptions | Full configuration information of GridView |
WaiOptions | Setting model for Shadow Dom |
Type Aliases
Type Alias | Description |
---|---|
BooleanOutputCallback | Callback function format to be performed when converting a boolean field |
CategoryCallback | Callback format for custom classification during automatic filtering |
CellSpanCallback | Callback to set custom cell spanning |
CellStyleCallback | Callbacks for dynamic cell style changes |
CheckableCallback | A callback that determines whether a check is possible in CheckBar |
ColumnObjectCallback | Callback used when displaying data whose dataType is object on the screen |
ColumnSummaryCallback | Callback format used when the user specifies the value displayed in the column's footer or summary |
CompareCallback | Value comparison callback format for user-specified conditions when searching |
CompareFunction | Comparison function format |
ConfigObject | |
CopyTextCallback | Callback format that returns text saved to the clipboard when copying the grid |
CreateFooterCallback | Callback format for specifying whether to display a specific group footer |
DataDragCallback | Callback format that occurs when starting drag and drop between grids |
DataDragLabelCallback | Format of the callback to determine the label text of the item being dragged |
DataDropCallback | Callback format that occurs when dragging and dropping between grids |
DataFieldInput | Input format for data fields |
DataFilters | Array and collection objects in filter conditions |
DataValues | Row Objects and Row Arrays |
DatetimeOutputCallback | Callback function format to be performed when converting a datetime field |
DropFieldMapCallback | A callback format that returns the rules applied when moving/copying by dragging and dropping between grids |
EditMask | The editor's display format, applicable to text or date fields |
ExpanderVisibleCallback | A callback that returns whether the group expander is visible |
ExportSimpleCallback | done Type of callback to be performed when completing export to set |
ExportValueCallback | Format for specifying callbacks to be performed when outputting each field in Grid Export Settings |
FieldValueCallback | If it is a calculated field, type of callback to be calculated by specifying a formula |
FilterCallback | filter callback |
FilterPanelCallback | This is a callback called when you enter text in the input window of FilterPanel and then type enter or after filterDelay. |
GetAriaLabelCallback | Callback format used in CellRenderer.ariaLabelCallback |
GetCellTitleCallback | Callback format for setting the alt text of an image when rendering an image or setting the title text of an HTML Anchor Element when rendering a link cell |
GetCheckedCallback | Callback type that determines check value when rendering |
GetClassCallback | Add class to a tag of linkRenderer |
GetImageCallback | A callback format that specifies the path to the image for rendering the image |
GetLinkUrlCallback | Callback format used in LinkCellRenderer.urlCallback |
GetShapeCallback | Callback format used in ShapeCellRenderer.shapeCallback to specify the type of shape in the shape renderer |
GetTemplateCallback | Callback format used in TemplateCellRenderer.callback |
GroupFooterCellSpanCallback | Callback to set custom groupFooter spanning |
GroupFooterStyleCallback | Callback to style grid group footer row |
GroupFooterUserSpanCallback | Callback to set custom groupFooterUser span |
HeaderCallback | Callback that returns the text displayed in the row group header |
Holidays | Setting model for specifying public holidays |
LayoutInfo | Information model of the layout returned by GridBase.saveColumnLayout() |
LayoutItem | A type of layout item model that allows you to create columns of the desired type |
ListCallback | DropDownCellEditor Used to retrieve items that change according to callback conditions used when creating a list. |
ListResult | return type of ListCallback or GridBase.onSearchCellButtonClick |
ListTemplateCallback | Callback used when the user writes an item displayed in the list in DropDownCellEditor or SearchCellEditor |
LookupData | Model information to populate LookupSource |
MemoCallback | Format for specifying a callback to be executed when printing notes for each cell in Export Excel Note |
MenuItemClick | Callback called when a menu item is clicked |
MultiCheckDisabledCallback | Callback format that determines whether an item is disabled when rendering |
MultiCheckKeydownCallback | Callback format that determines which value to select or clear on keydown in MultiCheckCellRenderer |
NumberOutputCallback | Callback function format to be performed when converting the number field |
ObjectToValuesCallback | Callback called for each row when data in json format is entered into the data provider |
OuterSortCallback | Callback format specified by the user when performing sorting |
ProgressCallback | A format for specifying a callback to be performed when showProgress is true in Grid Export Settings |
RealizeHeaderCallback | Callback format used in ColumnHeader.templateCallback or CellLayoutGroupHeader.templateCallback |
RealizeSummaryCallback | Callback format used in ColumnSummary.templateCallback |
RealizeValueCallback | Callback format used in TemplateCellRenderer.valueCallback |
RowBarCellStyleCallback | Callback to specify cell style in RowBar area |
RowBlockCallback | Callback to set row block mask |
RowHeightCallback | Callback format that returns the height of the row |
RowObject | row object |
RowStyleCallback | Callback for changing row style |
RowValues | row data |
ScrollMessageCallback | A callback type that returns a message displayed on the screen indicating the scroll position when livescroll is not applied |
SetCheckedCallback | Callback format that determines the check result value when editing |
SummaryCellSpanCallback | Callback to set custom headerSummary and footer spanning |
TreeIconCallback | Callback that specifies the icon displayed next to the tree expander [Parameter list]
[return value] - icon |
TreeTemplateEventCallback | Callback format used in TreeTemplateEventCallback |
UserCellsCallback | If there is a callback GridExportOptions.userCells that is used when the user adds output cells, it is not performed. |
ValueForGroupCallback | Although it is not the same value, it is used when the developer specifies a standard value when grouping it into one group. It must be returned with the same dataType as the dataType of the field. |
Enumeration Desc
BarOrigin
The position of the bar in BarCellRenderer
Members:
Member | Value | Description |
---|---|---|
BOTTOM | bottom | bottom |
DEFAULT | default | default |
LEFT | left | left |
RIGHT | right | right |
TOP | top | top |
Example:
column.renderer = {
"type": "bar",
"origin":"right"
}
ButtonVisibility
How to display the column button and edit button in the data cell when a button is set in the column
Members:
Member | Value | Description |
---|---|---|
ALWAYS | always | always visible |
DEFAULT | default | Only visible when the mouse is over a cell or a cell is selected |
HIDDEN | hidden | Do not display |
ROWFOCUSED | rowfocused | With row selected, Show |
VISIBLE | visible | With cells selected, select Show |
Remarks:
Used in the buttonVisibility and editButtonVisibility properties of ValueColumn.
Example:
// column button
column.buttonVisibility = false;
// Buttons in editor
column.editButtonVisibility = false;
CalendarMode
Set limits on the year, month, and day selection screen.
Members:
Member | Value | Description |
---|---|---|
DAY | day | You can select day . |
MONTH | month | You can only select up to month . |
YEAR | year | Only Year can be selected. |
Remarks:
Used to select year-month or only year.
CellButton
Type of button to display on the right side of data cell
Members:
Member | Value | Description |
---|---|---|
ACTION | action | Run button (calls onCellButtonClicked callback when clicked) |
NONE | none | No button |
POPUP | popup | Pop-up menu button |
Remarks:
Used in ValueColumn.button.
Example:
column.button = 'popup';
CellLayoutType
Specifies the type of layout.
Members:
Member | Value | Description |
---|---|---|
COLUMN | column | Create a layout connected to the column. |
GROUP | group | Used when adding groupLayout. |
Remarks:
GridBase.addLayout() or [CellLayoutGroupItem.addLayout()](/refsWhen adding a layout using /Interface/CellLayoutGroupItem#addlayout), specify the layout type.
ColumnHeaderItemLocation
Position type of image or check box in column header
Members:
Member | Value | Description |
---|---|---|
BOTTOM | bottom | bottom |
BOTTOM_EDGE | bottomEdge | bottom corner |
CENTER | center | middle |
LEFT | left | left |
LEFT_EDGE | leftEdge | Left corner |
NONE | none | None |
RIGHT | right | right |
RIGHT_EDGE | rightEdge | Right corner |
TOP | top | top |
TOP_EDGE | topEdge | top corner |
Remarks:
Used in ColumnHeader.checkLocation.
Example:
let col = grid.columnByName('col1')
col.header.checkLocation = 'leftEdge';
ColumnLayoutDirection
Placement direction when setting Cell Layout
Members:
Member | Value | Description |
---|---|---|
HORIZONTAL | horizontal | placed horizontally |
VERTICAL | vertical | placed vertically |
Remarks:
Used in CellLayoutGroupItem.direction.
DataDropMode
Mode when dropping data
Members:
Member | Value | Description |
---|---|---|
COPY | copy | Copy |
MOVE | move | Go |
DataFillMode
How to populate data
Members:
Member | Value | Description |
---|---|---|
APPEND | append | Append data after last row |
INSERT | insert | Insert |
SET | set | Ignore existing data and fill as many data rows starting from row 0 |
UPDATE | update | Replace existing data. Any remaining data after reaching the last row is ignored. |
Remarks:
Used in DataFillOptions.fillMode.
DefaultShowDate
When using the calendar editor, the type of dates displayed on the calendar
Members:
Member | Value | Description |
---|---|---|
DEFAULT | default | specified date |
DEFAULT_WHEN_NULL | defaultWhenNull | If there is data in the cell, the relevant date is selected and if there is no data, the specified date is selected and displayed. |
NORMAL | normal | General |
TODAY | today | today |
TODAY_WHEN_NULL | todayWhenNull | Same behavior as normal, but the current date is selected and displayed only if there is no date. |
Remarks:
Used in DateCellEditor.
Example:
column.editor = { type: "date", maxLength: 6, yearNavigation: true, defaultShowDate: 'today' }
DragFeedbackStyle
Feedback style that shows the drop location when the mouse is over
Members:
Member | Value | Description |
---|---|---|
CELL | cell | |
GROUP | group | Displayed in block form overlaid on the dropped column group cell. |
LINE | line | Line Displayed in line form above or below the dropped row |
ROW | row | Block or Row Displayed in block form overlaid on the dropped row |
DropDownPosition
A list of DropDownCellEditor or a calendar of DateCellEditor, BTDateCellEditor Position of selection box
Members:
Member | Value | Description |
---|---|---|
BUTTON | button | Align to button |
EDITOR | editor | Align to editor |
Example:
column.editor = {
type: 'list',
values: ['value1', 'value2'],
dropDownPosition: 'editor'
}
DropDownSortStyle
DropDownCellEditor How to sort the list
Members:
Member | Value | Description |
---|---|---|
ASCENDING | ascending | Ascending |
DESCENDING | descending | Descending |
NONE | none | Not specified |
Example:
column.editor = {
type: 'list',
values: ['value1', 'value2'],
itemSortStyle: 'descending'
}
DropDownValueLabel
How to show the list of DropDownCellEditor
Members:
Member | Value | Description |
---|---|---|
LABEL | label | label value only |
LABEL_VALUE | labelValue | label - value ordered pair |
VALUE | value | value only |
VALUE_LABEL | valueLabel | value - label ordered pair |
Example:
column.editor = {
type: 'list',
values: ['value1', 'value2'],
labels: ['label1', 'label2'],
displayLabels: 'valueLabel'
}
EdgeMark
edgeMark
Members:
Member | Value | Description |
---|---|---|
LEFT_BOTTOM | leftBottom | bottom left |
LEFT_TOP | leftTop | top left |
RIGHT_BOTTOM | rightBottom | Bottom right |
RIGHT_TOP | rightTop | top right |
Remarks:
Used in ValueColumn.edgeMark.
Example:
column.edgeMark = "leftTop"
ExitGridWhenTab
Conditions for leaving the grid when entering a tab
It can be set in EditOptions.exitGridWhenTab.
Members:
Member | Value | Description |
---|---|---|
GRID | grid | If it is the last cell of the grid, it goes out. |
NONE | none | When I press the tab key, I don't leave the grid. |
ROW | row | If it is the last cell in a row, it is left out. |
Example:
grid.editOptions.exitGridWhenTab = 'grid';
ExpanderVisibility
Whether to display Expander when grouping rows
Members:
Member | Value | Description |
---|---|---|
ALWAYS | always | Expander is always displayed when grouping rows. |
DEFAULT | default | Default value: Displays if multiple grouped rows are visible, otherwise does not display. |
NONE | none | Expander when grouping rowsdo not display |
Remarks:
Used in RowGroup.mergeExpanderVisibility.
Example:
gridView.rowGroup.mergeExpanderVisibility = 'always';
ExpandWhenSetData
Sets whether to keep the existing expansion after set data.
Members:
Member | Value | Description |
---|---|---|
COLLAPSE | collapse | Collapsed state |
EXPAND | expand | Expanded state |
REMAIN_AND_COLLAPSE | remainAndCollapse | Keep expanded state and collapse all new rows. |
REMAIN_AND_EXPAND | remainAndExpand | Keep expanded state and expand all new rows. |
Remarks:
Used in TreeOptions.expandWhenSetData.
ExportCompression
Whether to compress files when creating them
Members:
Member | Value | Description |
---|---|---|
DEFLATE | DEFLATE | Compresses files. |
STORE | STORE | Does not compress files. |
ExportLayoutExpand
When exporting a layout with layout Expandable set to true to Excel
Members:
Member | Value | Description |
---|---|---|
COLLAPSE | collapse | Printed in a folded state. |
CURRENT | current | current current shape |
EXPAND | expand | Print out in an unfolded state. |
IGNORE | ignore | Ignores expandable and outputs as set layout shape. |
ExportTarget
Destination when exporting a grid to an external document
Members:
Member | Value | Description |
---|---|---|
LOCAL | local | Save directly to local |
REMOTE | remote | Save via server |
STREAM | stream | Export to Console |
ExportType
Types of when to export a grid to an external document
Members:
Member | Value | Description |
---|---|---|
CSV | csv | CSV |
EXCEL | excel | Excel |
Remarks:
Used in ExportBaseOptions.type.
FilterMode
Filter operation mode after data modification
Members:
Member | Value | Description |
---|---|---|
AUTO | auto | automatic |
EXPLICIT | explicit | After modifying the data, you must explicitly filter it to be filtered |
Remarks:
Used in GridView.filterMode.
Example:
gridView.filterMode = 'explicit';
FocusMoveStep
How to move focus when inputting the left or right arrow when there is a columnGroup
Members:
Member | Value | Description |
---|---|---|
CELL | cell | Move by cell. |
GROUP | group | Move to the highest group level. |
FocusType
Display focus in layer form or display only the border.
It can be set in DisplayOptions.focusType.
Members:
Member | Value | Description |
---|---|---|
LAYER | layer | Displayed in the form of a layer covering the selected cell. |
LINE | line | Only the borders of selected cells are displayed as lines. |
GridCellType
Grid cell types
Members:
Member | Value | Description |
---|---|---|
CHECK | check | check bar |
DATA | data | data |
FILTER | filter | filter rowIndicator area |
FIXED_BAR | fixedbar | fixed bar |
FOOT | foot | foot |
FOOTER | footer | Footer |
GRID_EMPTY | gridEmpty | empty grid |
GROUP_BAR | groupBar | group bar |
GROUP_COLUMN | groupColumn | group column |
GROUP_FOOT | groupFoot | group foot |
GROUP_FOOTER | groupFooter | Group Footer |
GROUP_HEAD | groupHead | group head |
GROUP_HEADER | groupHeader | group header |
GROUP_PANEL | groupPanel | Group panel |
HEAD | head | head |
HEADER | header | header |
INDICATOR | indicator | indicator |
INLINE_FILTER | inlineFilter | inline-filter body area |
LAYOUT_HEADER | layoutHeader | Header of Column Group |
SCROLL_BAR | scrollBar | Scrollbar area |
SCROLL_BUTTON | scrollButton | Scrollbar button |
SCROLL_EDGE | scrollEdge | Scrollbar bottom right |
SCROLL_THUMB | scrollThumb | Scrollbar thumb area |
SCROLL_TRACK | scrollTrack | Scrollbar track area |
STATE | state | status bar |
SUM | sum | sum |
SUMMARY | summary | Summary |
Remarks:
Used in ClickData, etc.
Example:
gridView.onMenuItemClicked = function (grid, item, clickData) {
console.log(item.label + "was clicked.");
console.log("cellType is: " + clickData.cellType);
};
GridFitStyle
Constants that control how columns are displayed
Members:
Member | Value | Description |
---|---|---|
EVEN | even | If the total width of the displayed columns is smaller than the grid width, distribute the remaining size proportionally |
EVEN_FILL | evenFill | Always expand or contract to fit the grid width (using the column width) |
FILL | fill | If fillWidth is set, fill the grid using it, otherwise fill the grid in the same way as even |
NONE | none | Display as column width without adjustment |
Remarks:
Used in DisplayOptions.fitStyle, etc.
Example:
grid.displayOptions.fitStyle = 'even'
GroupShowMode
Determines whether the group column will be displayed when collapsed or expanded.
Set in CellLayoutItem.groupShowMode.
Members:
Member | Value | Description |
---|---|---|
ALWAYS | always | It is always visible. |
COLLAPSE | collapse | It is displayed when the group is closed. |
EXPAND | expand | It is displayed when the group is expanded. |
Remarks:
It is visible or hidden depending on the expansion state of the parent layout.
HandleVisibility
How to display handles
Members:
Member | Value | Description |
---|---|---|
ACTIVE_OR_HOVERED | activeOrHovered | Displays when active or hovered |
ALWAYS | always | always visible |
HIDDEN | hidden | Hidden |
HOVERED | hovered | Show only when hovered |
VISIBLE | visible | display |
Remarks:
The function icon displayed in the column header during sorting or filtering is called a handle.
HandleVisiblity is implemented as the handleVisibility property of SortingOptions, FilteringOptions.
Example:
grid.sortingOptions.handleVisibility = 'visible';
IconLocation
Location of icons, checkboxes, shapes, etc. to be rendered
Members:
Member | Value | Description |
---|---|---|
BOTTOM | bottom | Show below text |
BOTTOM_EDGE | bottomEdge | Show in bottom corner of cell |
CENTER | center | Show in center of cell |
LEFT | left | Show left of text |
LEFT_EDGE | leftEdge | Show in left corner of cell |
RIGHT | right | Show right of text |
RIGHT_EDGE | rightEdge | Show in right corner of cell |
TOP | top | Show above text |
TOP_EDGE | topEdge | Show in top corner of cell |
Remarks:
IconCellRendererUsed in , CheckCellRenderer, ShapeCellRenderer.
Example:
...
"renderer": {
"type": "check",
"checkLocation": "right"
},
...
IndicatorValue
Type of content to be displayed on the indicator
Members:
Member | Value | Description |
---|---|---|
INDEX | index | row order |
NONE | none | None |
REVERSE | reverse | Reverse row order |
ROW | row | row unique number |
InlineFilterOperator
This is the type of operator that can be used in FilterPanel.
Members:
Member | Value | Description |
---|---|---|
BETWEEN | between | Specify the range. |
CONTAINS | contains | Data containing the entered value |
EMPTY | empty | Search for data without value |
ENDS_WITH | endsWith | Data ending with the entered value |
EQUAL | equal | Data identical to the entered value |
GREATER | greater | Data greater than the entered value |
GREATER_EQUAL | greaterEqual | Data greater than or equal to the entered value |
LOWER | lower | Data smaller than the entered value |
LOWER_EQUAL | lowerEqual | Data less than or equal to the entered value |
NOT_CONTAINS | notContains | Data that does not contain the entered value |
NOT_EQUAL | notEqual | Data different from the entered value |
RESET | reset | Clears the entered value and deactivates the filter. |
STARTS_WITH | startsWith | Data starting with the entered value |
Remarks:
There are restrictions on the operators that can be used depending on DataColumn.valueType.
ItemState
Condition of the item
Members:
Member | Value | Description |
---|---|---|
APPENDING | appending | If adding |
DUMMY | dummy | dummy |
FOCUSED | focused | If the entered index is the index of the item currently being edited |
INSERTING | inserting | If inserting |
NORMAL | normal | If you are not editing, adding, or typing |
UPDATING | updating | If you are editing |
ItemType
Types of items in the grid
Members:
Member | Value | Description |
---|---|---|
FOOTER | footer | Group Footer |
GROUP | group | group item |
ROW | row | row |
TREE | tree | tree items |
Remarks:
Used in getModelAs(), etc.
Example:
let model = gridView.getModelAs(3, 'row');
LayoutDirection
Direction of item placement
Members:
Member | Value | Description |
---|---|---|
HORIZONTAL | horizontal | Arrange items horizontally. |
VERTICAL | vertical | Arrange items vertically. |
MenuItemType
Types of menu items displayed in PopupMenu, etc.
Members:
Member | Value | Description |
---|---|---|
CHECK | check | checkbox and text |
NORMAL | normal | plain text |
RADIO | radio | radio button and text |
SEPARATOR | separator | Separation between menu items |
Remarks:
Used in PopupMenuItem.type and MenuItem.type.
Example:
let menu = [{
label: "This is menu3",
type: "check",
checked: true,
}]
NullsOrder
When sorting, place undefined, null ''
at the top or bottom regardless of ascending or descending order.
Set in SortingOptions.nullsOrder.
Members:
Member | Value | Description |
---|---|---|
DEFAULT | default | When in ascending order, place it at the top, and when in descending order, place it at the bottom. |
FIRST | first | Place it at the top. |
LAST | last | Place it at the bottom. |
PolygonShape
List of shapes available in ShapeCellRenderer
Members:
Member | Value | Description |
---|---|---|
DIAMOND | diamond | diamond |
DOWN_ARROW | downarrow | arrow pointing down |
EQUAL | equal | equal sign |
INVERTED_TRIANLGE | itriangle | inverted triangle |
LEFT_ARROW | leftarrow | Arrow pointing left |
MINUS | minus | minus sign |
PLUS | plus | plus sign |
RECTANGLE | rectangle | rectangle |
RIGHT_ARROW | rightarrow | arrow pointing right |
STAR | star | star shape |
TRIANLGE | triangle | triangle |
UP_ARROW | uparrow | arrow pointing up |
Example:
column.renderer = {
"type": "shape",
"shape": "triangle" // PolygonShape
}
RefreshMode
Constants needed when redrawing the grid
Members:
Member | Value | Description |
---|---|---|
ALL | all | Redraw all columns |
RECYCLE | recycle | When scrolling vertically, only visible columns are redrawn, and when scrolling horizontally, the entire column is redrawn. |
VISIBLE_ONLY | visibleOnly | Redraw only visible columns |
Remarks:
Used in DisplayOptions.refreshMode.
Example:
grid.displayOptions.refreshMode = 'visibleOnly';
RestoreMode
Restoration mode type
Members:
Member | Value | Description |
---|---|---|
AUTO | auto | If you just change it back to the original value, the RowState will also return to its original state. |
EXPLICIT | explicit | RowState and value are changed only when restoreUpdatedRows() is explicitly used. |
NONE | none | Do not set recovery mode. |
RowGroupAdornments
How to display header or footer when in row group state
Members:
Member | Value | Description |
---|---|---|
BOTH | both | Show both header and footer when in row group state |
FOOTER | footer | Show footer when in row group state |
HEADER | header | Show header when in row group state |
NONE | none | Not displayed, only applicable in expandedAdornments state. |
SUMMARY | summary | Display summary contents in header position when in row group state |
Remarks:
RowGroup.collapsedAdornments, RowGroup.expandedAdornmentsIt is used in
Example:
grid.setRowGroup({expandedAdornments: "none"});
RowMaskType
Display type of selected row (row mask type)
Members:
Member | Value | Description |
---|---|---|
CELL | cell | one cell |
DATA | data | column area |
FILL | fill | Area including indicator, status bar, check bar, and column + empty area |
NONE | none | None |
ROW | row | Area including indicator, status bar, check bar, and column |
Remarks:
rowBlockType, rowHoverType, [rowFocusType](/refs/Interface/DisplayOptions #rowfocustype), etc.
Example:
grid.displayOptions.rowBlockCallback = f;
grid.displayOptions.rowBlockType = 'row';
RowState
status of row
Members:
Member | Value | Description |
---|---|---|
CREATE_AND_DELETED | createAndDeleted | Deleted after creation |
CREATED | created | Created |
DELETED | deleted | Deleted |
NONE | none | nothing |
UPDATED | updated | Updated |
ScrollOnEditing
Processing status when scrolling while editing
Members:
Member | Value | Description |
---|---|---|
CANCEL | cancel | Cancel Edit |
COMMIT | commit | commit |
DEFAULT | default | Maintain Editor |
Remarks:
It can be set in EditOptions.scrollOnEditing.
Example:
grid.editOptions.scrollOnEditing = 'cancel';
SelectionDisplay
Cell selection display
Members:
Member | Value | Description |
---|---|---|
CELL | cell | cell |
CELL_AND_BORDER | cellAndBorder | Cells and Borders |
MASK | mask | mask |
Remarks:
developing...
SelectionMode
Mode for cell selection
Members:
Member | Value | Description |
---|---|---|
EXTENDED | extended | Use multiple area selection |
NONE | none | Do not use area selection. |
SINGLE | single | Use only one area selection |
Remarks:
Used in DisplayOptions.selectionMode.
SelectionStyle
Styles for cell selection
Members:
Member | Value | Description |
---|---|---|
BLOCK | block | Select by block type |
COLUMNS | columns | Select by column |
GROUP | group | Select in the same format as block, but select in groups rather than cells. |
NONE | none | Not selectable |
ROWS | rows | Select by row |
SINGLE | single | Select only one cell |
SINGLE_COLUMN | singleColumn | Select only one column |
SINGLE_ROW | singleRow | Select only one row |
Remarks:
SINGLE
, SINGLE_ROW
, and SINGLE_COLUMN
are called single selection styles.
Used in DisplayOptions.selectionStyle.
For the RowIndicator.selectable function to work properly, DisplayOptions.selectionStyle must not be a single selection style.
If DisplayOptions.selectionStyle is not a single selection style, a column-wise selection area is specified when you press the ctrl
key and then drag the column header.
SortCase
Case sensitive type
Members:
Member | Value | Description |
---|---|---|
INSENSITIVE | insensitive | No distinction |
SENSITIVE | sensitive | Category |
Remarks:
Used in SortingOptions.textCase, orderBy(), etc.
Example:
gridView.orderBy(['fruit'], ['descending'], ['insensitive']);
SortDirection
sorting method
Members:
Member | Value | Description |
---|---|---|
ASCENDING | ascending | Ascending |
DESCENDING | descending | Descending |
NONE | none | None |
Remarks:
Used in getDistinctValues(), orderBy(), etc.
Example:
gridView.orderBy(['fruit'], ['descending'], ['insensitive']);
SortMode
Sort operation mode after data modification
Members:
Member | Value | Description |
---|---|---|
AUTO | auto | automatic |
EXPLICIT | explicit | After data modification, sorting must be performed explicitly. Sort |
Remarks:
Used in GridBase.sortMode.
Example:
gridView.sortMode = "explicit";
SortStyle
Sort type when clicking on grid column header
Members:
Member | Value | Description |
---|---|---|
EXCLUSIVE | exclusive | Sort by last clicked column |
INCLUSIVE | inclusive | Sort by first clicked column |
NONE | none | Unsorted |
REVERSE | reverse | Sort by last clicked column first |
Remarks:
Used in SortingOptions.style.
Example:
grid.sortingOptions.style = 'inclusive'
StateMark
How to display status in status bar
Members:
Member | Value | Description |
---|---|---|
IMAGE | image | image |
NONE | none | None |
TEXT | text | text |
SummaryMode
How to calculate the sum of each column in the grid
Members:
Member | Value | Description |
---|---|---|
AGGREGATE | aggregate | Automatically calculates arithmetic sums such as sum, average, maximum, and minimum values |
NONE | none | not calculated |
STATISTICAL | statistical | Automatically calculate statistical sums such as variance, standard deviation, etc. |
Remarks:
It can be set and used in GridBase.summaryMode, etc.Example:
let sum = gridView.getSummary('unitPrice', 'sum');
SummaryType
Type for calculating the total value of a field
Members:
Member | Value | Description |
---|---|---|
AVG | avg | average |
COUNT | count | count |
DATAAVG | dataavg | average divided by DATACOUNT |
DATACOUNT | datacount | Number of data with specified value (not null) |
MAX | max | maximum value |
MIN | min | Minimum |
STDEV | stdev | Sample population standard deviation |
STDEVP | stdevp | population standard deviation |
SUM | sum | Sum |
VAR | var | Sample population variance |
VARP | varp | population variance |
Remarks:
Used in GridBase.getSummary().
Example:
let sum = gridView.getSummary('unitPrice', 'sum');
SyncGridHeight
Change the height of the grid so that all searched data can be seen.
Members:
Member | Value | Description |
---|---|---|
ALWAYS | always | Always set the grid height to the data area. |
NONE | none | Maintain the specified height. |
OVER | over | Change the height of the grid when it becomes larger than the area of the grid. |
Remarks:
If there is no data, the initial height is displayed. If a lot of data is output, it becomes slow, so you need to import only some data and then add data using the 'More' button.
TextInputCase
uppercase and lowercase letters
Members:
Member | Value | Description |
---|---|---|
DEFAULT | default | If set to this value in the editor, it will follow the value set in the column |
LOWER | lower | lowercase |
NORMAL | normal | Display as entered |
UPPER | upper | Capitalize |
Remarks:
Used in ValueColumn.textInputCase, CellEditor.textCase, etc.
Example:
column.editor = { type: "line", maxLength: 1, textCase: 'lower'}
TimeCategory
Classification unit when filtering by time
Members:
Member | Value | Description |
---|---|---|
AUTO | auto | Data is classified according to its value. If time is omitted, it is classified by date. |
HOUR | hour | Categorize by time. |
MINUTE | minute | Classified down to the minute. |
NONE | none | Sort by date, not by time. |
SECOND | second | Classifies down to the second. |
Remarks:
Used in FilterAutomatingOptions.timeCategorize.
TimeSelectType
Members:
Member | Value | Description |
---|---|---|
HOUR | hour | Displays the time selection screen. |
MINUTE | minute | Displays the hour/minute selection screen. |
NONE | none | The time selection screen is not displayed. |
SECOND | second | Displays the hour/minute/second selection screen. |
TreeExpanderIconStyle
Specifies the style of the default icon displayed in Tree Expander.
Members:
Member | Value | Description |
---|---|---|
SQUARE | square | Displays a square-shaped Tree Expander icon. |
TRIANGLE | triangle | Displays the triangular Tree Expander icon. |
UserFilterPosition
Position of user filter when autoFilter and user filter are shown at the same time
Members:
Member | Value | Description |
---|---|---|
FIRST | first | Position user filter at the top of autoFiler. |
LAST | last | Position user filter at the bottom of autoFiler. |
NONE | none | Do not display user filter. |
ValidationLevel
Data verification result level
Members:
Member | Value | Description |
---|---|---|
ERROR | error | error |
IGNORE | ignore | None |
INFO | info | Information |
WARNING | warning | warning |
Remarks:
Used in GridBase.setValidations(), etc.
Example:
gridView.setValidations({
message: 'Too expensive!',
criteria: "values['UnitPrice'] > 100",
level: 'error'
})
ValidationMode
Verification method
Members:
Member | Value | Description |
---|---|---|
ALWAYS | always | Always (insert, modify) whenever committed |
INSERT | insert | When the added row is committed |
UPDATE | update | When the modified row is committed |
Remarks:
Used in GridBase.setValidations(), etc.
Example:
gridView.setValidations({
message: 'Too expensive!',
criteria: "values['UnitPrice'] > 100",
mode: 'always'
})
ValueType
Data type of data field
Members:
Member | Value | Description |
---|---|---|
BOOLEAN | boolean | Boolean |
CHAR | char | character |
DATE | date | Date with time part removed |
DATETIME | datetime | date |
INT | int | integer type |
NUMBER | number | numbers |
OBJECT | object | object |
TEXT | text | text |
UINT | uint | integer value greater than or equal to 0 |
UNUM | unum | numbers greater than or equal to 0 |
Remarks:
When used in DataField.dataType, TEXT
, NUMBER
, DATETIME
, BOOLEAN It is used as
, OBJECT
, and when you want to limit the applied data type, it can be given to DataField.subType as follows.
dataType is TEXT
: CHAR
dataType has NUMBER
: INT
, UNUM
, UINT
dataType is DATETIME
: DATE
Example:
let fields = [{
...
dataType: "text",
subType: "char",
...
}]
ds.setFields(fields);
VerticalMoveStep
How to move focus when an up or down arrow is entered in a subcolumn of a ColumnGruop whose direction is vertical
.
Members:
Member | Value | Description |
---|---|---|
CELL | cell | Move by cell. |
ROW | row | Move row by row. |
Type Aliases Desc
BooleanOutputCallback
Callback function format to be performed when converting a boolean field
Remarks:
Used in DataOutputOptions.booleanCallback.
[Parameter list]
ds
- DataProvider control
row
- the index of the item
field
- field name
value
- the value
[return value] - value to output
Example:
const f = function(ds, row, field, value) {
return !!value;
}
CategoryCallback
Callback format for custom classification during automatic filtering
Remarks:
[Parameter list]
column
- Column with automatic filtering applied
values
- all values
[Return value] - Array type of category classification model
Example:
const f = function(column, values) {
const emptyText = 'Empty item'
if (!values) {
return null;
}
const valids = values.filter(function (el) { return el !=undefined && el != null; });
const min = Math.min.apply(null, valids);
const vlen = values.length;
let unit;
if (vlen > 15) {
const groupCount = Math.min(Math.round(vlen / 5)), 10);
unit = Math.round(vlen / groupCount);
} else {
unit = 1;
}
let categories = [];
let gvals = [];
let gindex = 0;
let gmin = min;
let isEmpty = false;
for (let i = 0; i < vlen; i++) {
const v = values[i];
if (v === undefined || v === null) {
isEmpty = true;
continue;
}
if (i == gindex + unit || i === vlen - 1) {
categories.push({ text: gmin + ' ~ ' + v, values: gvals });
gvals = [v];
gindex = i;
gmin = v;
} else {
gvals.push(v);
}
}
if (isEmpty) {
categories.push({ text: emptyText, empty: true });
}
return categories;
}
CellSpanCallback
Callback to set custom cell spanning
Remarks:
Used in CellLayoutColumnItem.
[Parameter list] grid
- GridBase control
layout
- layout item
itemIndex
- the index of the row
Example:
const f = function (grid, layout, itemIndex) {
var value = grid.getValue(itemIndex, layout.column.dataIndex);
if (value) {
return value[0] === "B" ? 3: value[0] === "F" ? 2:1;
}
return 1;
};
CellStyleCallback
Callbacks for dynamic cell style changes
Remarks:
When returning ColumnStyleObject, GridBase.setCellStyleCallback(), [ValueColumn.styleCallback](/refs/Interface/ Used in ValueColumn#stylecallback).
ColumnSummaryStyleObject returns GridFooter.cellStyleCallback, [HeaderSummary.cellStyleCallback](/refs/Interface/HeaderSummary# cellstylecallback).
Specified as a style name when returning a string
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
[Return value] - Object or style class name to apply dynamic style
Example:
const f1 = function(grid, model) {
if (model.value > 5) return "rg-data-cell bold-cell";
if (model.value < 0 && model.value > -10) {
return {
styleName: 'custom-negative-cell',
renderer: {
type: 'bar',
absoluteValue: true
}
}
}
}
const f2 = function(grid, model) {
if (model.value > 10) {
return {
styleName: 'custom-summary-cell'
}
}
}
// Apply to all data cells
gridView.setCellStyleCallback(f1);
// Apply to each column
let column = gridView.columnByName('Price');
column.styleCallback = f1;
// Apply footer
gridView.footer.cellStyleCallback = f2;
// Apply header summary
gridView.headerSummary.cellStyleCallback = f2;
CheckableCallback
A callback that determines whether a check is possible in CheckBar
Remarks:
[Parameter list]
dataSource
- DataProvider control
item
- The item to be checked (row item, header item, etc.)
[Return value] - Checkable or not
Example:
const f = function(dataSource, item) {
if (item.value) {
return item.value !== 'doNotCheck';
}
else {
return false;
}
}
ColumnObjectCallback
A callback used when displaying data whose dataType
is object
on the screen.
Remarks:
[Parameter list]
fieldName
- field name
dataRow
- dataRow
value
- value
[Return value] - Content to display on screen
Example:
const callback = function(fieldName, dataRow, value) {
return JSON.stringify(value);
}
gridView.columnByName("objectColumn").objectCallback = callback;
ColumnSummaryCallback
Callback format used when the user specifies the value displayed in the footer or summary of the column
Remarks:
[Parameter list]
grid
- gridView
column
- Column of footer or summary
footerIndex
- Order number if there are multiple footers in the column
summary
- footer or summary object GroupItem object if groupFooter
value
- the value if expression is specified
[Return value] - Content to be displayed on the screen.
CompareCallback
Value comparison callback format for user-specified conditions when searching
Remarks:
[Parameter list]
v1
- the value to be searched for
v2
- the searched value
sensitive
- case sensitive
partialMatch
- Whether to also search for contained characters
[Return value] - Whether the value matches
Example:
const f = function(v1, v2, sensitive, partialMatch) {
if (v1 === v2) {
return true;
}
let s1 = String(v1);
let s2 = v2 == null ? undefined : String(v2);
if (!s1 && !s2) {
return true;
}
if (!s1 || !s2) {
return false;
}
if (!caseSensitive) {
s1 = s1.toLowerCase();
s2 = s2.toLowerCase();
}
if (partialMatch) {
return s2.indexOf(s1) >= 0;
} else {
return s1 == s2;
}
}
CompareFunction
Comparison function format
Remarks:
It has the same format as CompareFunction used in Array.prototype.sort().
Used in DataProviderBase.setDataComparer().
ConfigObject
CopyTextCallback
Callback type that returns text saved to the clipboard when copying the grid
Remarks:
[CopyOptions.copyTextCallback]Used in (/refs/Interface/CopyOptions#copytextcallback).
[Parameter list]
grid
- GridBase control
itemIndex
- itemIndex of the row being copied
column
- DataColumn object
[Return value] - When returning undefined
, the text to be copied to the clipboard, the text is copied according to value or other settings in copyOptions.
Example:
const f = function(grid, itemIndex, column, value) {
if (value != null && column.name === "number1") {
return value + "";
}
}
grid.copyOptions.copyTextCallback = f;
CreateFooterCallback
Callback format for specifying whether to display a specific group footer
Remarks:
This is the format used in RowGroup.createFooterCallback.
[Parameter list]
owner
- GridBase control
group
- group item
footerIndex
- Index within the footer collection
Example:
createFooterCallback: function(owner, group, footerIndex) {
if (group.level >= 5) { return false }
if (group.level === 4) {
let relation2 = owner.getDataSource().getValue(group.firstItem.dataRow, "relation2");
return relation2 === "relative"
}
if (group.level === 3) {
let relation1 = owner.getDataSource().getValue(group.firstItem.dataRow, "relation1");
return relation1 === "same person"
}
return true;
}
DataDragCallback
Callback format that occurs when starting drag and drop between grids
Remarks:
If false
is returned, drag and drop is canceled. Used in DataDropOptions.dragCallback.
[Parameter list]
source
- the GridBase control where the dragged item was located
sourceItems
- Index of items in the dragged grid
target
- GridBase control or HTMLElement to drop
targetItem
- Index of the item in the grid to drop
targetColumn
- targetColumn in the grid to drop to
[Return value] - Whether drag and drop is possible
Example:
gridView.dataDropOptions.dragCallback = function (source, sourceItems, target, targetItem) {
return targetItem % 2 == 0;
}
DataDragLabelCallback
Format of the callback to determine the label text of the item being dragged
Remarks:
[Parameter list]
source
- the GridBase control where the dragged item was located
sourceItems
- Index of items in the dragged grid
target
- GridBase control or HTMLElement to drop
targetItem
- Index of the item in the grid to drop
targetColumn
- targetColumn in the grid to drop to
[return value] - the text of the label
Example:
gridView.dataDropOptions.labelCallback = function (source, sourceItems, target, targetItem) {
return sourceItems.length + " rows ";
}
DataDropCallback
Callback format that occurs when dragging and dropping between grids
Remarks:
Used in DataDropOptions.callback.
[Parameter list]
source
- the GridBase control where the dragged item was located
sourceItems
- Index of items in the dragged grid
target
- GridBase control or HTMLElement to drop
targetItem
- Index of the item in the grid to drop
targetColumn
- targetColumn in the grid to drop to
Example:
gridView.dataDropOptions.callback = function (source, sourceItems, target, targetItem) {
alert('row from ' + sourceItems + ' to ' + targetItem);
for (var i = 0; i < sourceItems.length; i++) {
var r = source.getDataRow(sourceItems[0]);
var ds = source.getDataSource();
var row = ds.getJsonRow(r)
if (targetItem >= target.getItemCount()) {
ds.addRow(row);
} else {
r = target.getDataRow(targetItem);
target.getDataSource().insertRow(r, row);
}
}
}
DataFieldInput
Input format for data fields
Remarks:
Used in setFields, etc.
Example:
// string
ds.setFields('fieldName');
// model
let fields = ds.getFields();
ds.setFields(fields);
//config
ds.setFields({
fieldName: 'OrderID',
dataType: 'text',
});
DataFilters
Array and collection objects in filter conditions
Remarks:
Used in LocalDataProvider.setFilters().
Example:
// string
dataProvider.setFilters([
"value['field1']='Singer'",
"value['field2']='Woman'"
], "and");
//object
dataProvider.setFilters([
{criteria: "value['field1']='Singer'"},
{criteria: "value['field2']='Woman'"}
], "and");
DataValues
Row objects and row arrays
Remarks:
It is used in various ways in the method of LocalDataProvider, LocalTreeDataProvider.
Example:
//array
let row = ['value1', 'value2', 'value3']
//object
let row = {field1: 'value1', field2: 'value2', field3: 'value3'}
DatetimeOutputCallback
Callback function format to be performed when converting a datetime field
Remarks:
Used in DataOutputOptions.datetimeCallback.
[Parameter list]
ds
- DataProvider control
row
- the index of the item
field
- field name
value
- the value
[return value] - value to output
Example:
const f = function(ds, row, field, value) {
if (value === 'today') {
return new Date();
}
return new Date(value);
}
DropFieldMapCallback
A callback format that returns the rules applied when moving/copying by dragging and dropping between grids.
Remarks:
[Parameter list]
source
- the GridBase control where the dragged item was located
sourceItems
- Index of items in the dragged grid
target
- GridBase control to drop
targetItem
- Index of the item in the grid to droptargetColumn
- targetColumn in the grid to drop to
[Return Value] - FieldMap object
Example:
gridView.dataDropOptions.fieldMapCallback = function (source, sourceItems, target, targetItem) {
if (targetItem % 2 == 0) {
return {
Country: "Country",
CompanyName: "ShipAddress",
EmployeeID: "ShipPostalCode"
}
}
}
EditMask
The editor's display format that can be applied to text or date fields.
Remarks:
When applying ValueColumn.editor, it is used in the editor's mask property.
For numeric fields, use NumberCellEditor.editFormat.
The format applied to Marks is displayed only in the editor.
dropDown, multiLine, multiCheck, does not work in number Editor.
Example:
// string
column.editor = {
type: 'line',
mask: '9999-99-99'
}
//object
column.editor = {
type: 'line',
mask: {
editMask: '9999-99-99',
placeHolder: 'input...'
}
}
ExpanderVisibleCallback
A callback that returns whether the group expander is visible.
Remarks:
This is the format used in RowGroup.expanderVisibleCallback.
[Parameter list] grid
- GridBase control
group
- group item
Example:
gridView.rowGroup.expanderVisibleCallback = function(grid, group) {
// Only 2-level groups display the expander.
return group.level === 2;
}
ExportSimpleCallback
Format of the callback to be performed when completing the export to set done
Remarks:
[Parameter list]
data
- Sent when the target is stream
.
ExportValueCallback
Format for specifying callbacks to be performed when outputting each field in Grid Export Settings
Remarks:
[Parameter list]
index
- index
name
- Column name or field name
value
- the entered value
grid
- the grid or data provider being exported
[return value] - value to be exported
FieldValueCallback
If it is a calculated field, the type of callback to be calculated by specifying a formula
Remarks:
Used in DataField.valueCallback or DataFieldObject.valueCallback.
Finally, simply return the value you want to output.
[Parameter list]
ds
- DataProvider control
rowId
- Row unique number
fieldName
- Field name
fields
- array of field names
values
- array of values
[return value] - value to output
Example:
function (ds, rowID, fieldName, fields, values) {
let quantity = values[fields.indexOf("Quantity")];
let unitprice = values[fields.indexOf("UnitPrice")];
if (isNaN(quantity) || isNaN(unitprice))
return undefined;
else
return quantity >= 1000 ? Math.round(quantity * unitprice * 0.95) : quantity * unitprice;
}
FilterCallback
filter callback
Remarks:
If the return value is undefined
, ColumnFilter.criteria is applied.
Used in ColumnFilter.callback or FilterAutomatingOptions.selectCallback.
[Parameter list]
ds
- Provider control
dataRow
- the index of the row
level
- level
field
- field name
filter
- ColumnFilter object
value
- the value
[Return value] - Whether to decide on filtering
Example:
const f = function(ds, dataRow, level, field, filter, value) {
let res = isMatched(value, filter.criteria);
return res;
}
FilterPanelCallback
This is a callback called when you enter text in the input window of FilterPanel and then type enter
or after filterDelay.
Remarks:
If true
is returned, grid filtering is not performed. When operator and text are returned, filtering is performed using the entered operator and text.
[Parameter list]
grid - GridBase control
column - the column object of the input window
operator - InlineFilterOperator
text - entered text
Example:
grid.filterPanel.filterPanleCallback = function(grid, column, operator, text) {
if (column.fieldName === "notRun") {
return true; // Fields that are notRun are not filtered.
} else if (column.fieldName = "userFilter") {
return {
operator: InlineFilterOperator.STARTS_WITH,
text: text.substr(0,2) // Filter only the first 2 characters of the entered characters.
}
}
}
GetAriaLabelCallback
Callback format used in CellRenderer.ariaLabelCallback
Remarks:
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
[Return Value] - String to be read by the screen reader.
Example:
const f = function(grid, model) {
var s = model.value;
var date = grid.getValue(model.item.index, "date")
s += (date.getTime() > Date.now() - 60*60*24*7*1000) ? " new" : "";
return s;
}
column.renderer = {
type: 'text',
ariaLabelCallback: f
}
GetCellTitleCallback
A callback format for setting the alt text of an image when rendering an image or setting the title text of an HTML Anchor Element when rendering a link cell.
Remarks:
Used in ImageCellRenderer.titleCallback or LinkCellRenderer.titleCallback.
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
[return value] - alt text or title text
Example:
const f = function(grid, model) {
return 'catimage'
}
GetCheckedCallback
Callback type that determines the check value when rendering
Remarks:
Used in CheckCellRenderer.getCheckedCallback.
[Parameter list]
grid
- GridBase control
itemIndex
- Order of items
column
- a column object
value
- the value
[Return value] - Checked or not
Example:
const f = function(grid, itemIndex, column, value) {
if (typeof value === "number") {
return value % 2 === 1;
}
else if (typeof value ==="boolean") {
return value;
}
else {
return Boolean(v);
}
}
GetClassCallback
Add class to a tag of linkRenderer
Remarks:
Used when adding a class to the a tag of LinkCellRenderer.
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
[return value] - string
Example:
const callback = function (grid, model) {
let cls = "";
model.value.indexOf("New post") > 0 && (cls += " new");
model.value.indexOf("Secret post") > 0 && (cls += " lock");
// When adding a new post/secret post icon to the link in background format
}
GetImageCallback
A callback format that specifies the path to the image for rendering.
Remarks:
Used in ImageCellRenderer.imageCallback or IconCellRenderer.iconCallback.
[Property List]
grid
- GridBase control
model
- a cell in the grid
[return value] - image path
Example:
const f = function(grid, model) {
const base = '/images/';
if (jpgSet.indexOf(model.value)){
return base + model.value + '.jpg';
}
else base + 'default.jpg';
}
GetLinkUrlCallback
Callback format used in LinkCellRenderer.urlCallback
Remarks:
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
[Return value] - Url address
Example:
...
"renderer" : {
"type": "link",
"urlCallback": function (grid, cell) {
return "http://realgrid.com";
},
}
...
GetShapeCallback
Callback format used in ShapeCellRenderer.shapeCallback to specify the type of shape in the shape renderer.
Remarks:
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
[Return value] - Shape type, PolygonShape or 'ellipse'.
Example:
const f = function(grid, model) {
if (model.value) {
return 'ellipse';
}
else {
return 'minus';
}
}
GetTemplateCallback
Callback format used in TemplateCellRenderer.callback
Remarks:
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
width
- width of the cell
height
- height of the cell
[Return value] - template format of string type
Example:
const f = function (grid, model, width, height) {
return "<img src='images/realgrid-logo.png' height='" + height / 2 + "'></img>" + "<div>" + model.value + "</div>";
}
column.renderer = {
type: "html",
callback: f
}
GroupFooterCellSpanCallback
Callback to set custom groupFooter spanning
Remarks:
Used in CellLayoutColumnItem.
[Parameter list] grid
- GridBase control
layout
- layout item
itemIndex
- the index of the row
footerIndex
- index of groupFooter
GroupFooterStyleCallback
Callback to style the grid group footer row
Remarks:
This is the format used in RowGroupFooter.styleCallback.
[Parameter list] grid
- GridBase control
itemIndex
- the itemIndex of the footer
footerIndex
- The index of the footer if there are multiple footers in the group.
Example:
var f = function(grid, itemIndex, footerIndex) {
var dataRow = grid.getGroupModel(itemIndex, true).firstDataItem.dataRow;
var value = grid.getDataSource().getValue(dataRow, "area2name");
return value && value.indexOf("Gun") >= 0 ? `style-1-${footerIndex}` : undefined;
};
gridView.rowGroup.setFooters([{styleCallback: f},{styleCallback: f}]);
GroupFooterUserSpanCallback
Callback to set custom groupFooterUser span
Remarks:
Used in CellLayoutColumnItem.
[Parameter list] grid
- GridBase control
layout
- layout item
model
- GroupModel
itemIndex
- the index of the row
footerIndex
- index of groupFooter
HeaderCallback
Callback that returns the text displayed in the row group header
Remarks:
This is the format used in RowGroup.headerCallback. RowGroup.headerStatement is ignored if present.
[Parameter list] grid
- GridBase control
group
- group item
Example:
gridView.rowGroup.headerStatement = undefined;
gridView.rowGroup.headerCallback = function(grid, group) {
var ds = grid.getDataSource()
if (group.level === 1) {
return ds.getOrgFieldName(group.groupField) + " - " + group.firstDataItem.getData(group.groupField) + " - " + group.descendantCount + " rows"
} else if (group.level === 2) {
var sum = group.getSum("number");
return isNaN(sum) ? "no sum" : ("sum => "+ sum.toString());
} else {
return "GroupLevel => "+group.level.toString()
}
}
Holidays
Setup model for specifying public holidays
Remarks:
It is used when specifying using GridBase.setEditorOptions() or directly specifying in grid.editorOptions.holidays.
It is also used in DateCellEditor.
Example:
holidays: [
{
type: "date",
dates : ["2020-01-24","2020-01-25","2020-01-26","2020-01-27"],
styleName: "seollal",
tooltips : ["Seollal 1","Seollal 2","Seollal 3","Seollal 4"]
},
...
]
LayoutInfo
The information model of the layout returned by GridBase.saveColumnLayout()
Example:
// array of LayoutInfo
[
{column: "OrderID", visible: true, width: 80},
{column: "CustomerID", visible: true, width: 90},
{
name: "companyGroup"
items: [
{
name: "countryGroup"
items: [
{column: "Country", visible: true, width: 100},
{column: "Phone", visible: true, width: 100}
]
visible: true;
direction: "horizontal",
width: 250,
header: {visible: true, text: "Country Group"}
},
{column: "CompanyName", visible: true, width: 100}
]
visible: true;
direction: "vertical",
width: 250,
header: {visible: true, text: "Company Group"}
},
{column: "EmployeeID", visible: true, width: 90}
]
LayoutItem
A type of layout item model that allows you to create columns of the desired type.
Remarks:
Used in GridBase.setColumnLayout().
[Concept Description]
span is a similar concept to html table's colspan (opens in a new tab).
The area is divided by the number of spans and the number of columns, and the area is divided by the sum of width
and the following numbers.
It spans in layout units. In other words, if the next layout is a group, it spans the entire group.
You cannot span outside the group.
Groups cannot span.
Proceeds from left to right, top to bottom.
Span from the top layout first (top-down).
If the group spans the following layouts, newly added cells are distributed to child layouts.
(Distribution method: Distribute starting from the last layout according to the ratio of the number of cells in the lower layout.)
When rows are merged, there must be no row misalignment with the next layouts to be spanned.
fixed, rightFixed cannot cross the boundary.
Example:
[
{
name: "companyGroup",
items: [
{
column: "Country",
cellSpan: 3
},
20,20,
{
column: "CompanyName",
cellSpan: 3
},
20,20,
],
header: true
},
...
];
ListCallback
Used to retrieve items that change according to callback conditions used when creating a list of DropDownCellEditor.
Remarks:
In order for DataColumn.lookupDisplay to be applied, DataColumn.labelField must be used. .
If undefined
is returned while lookupSource is connected to the column, the data in the lookupSource is displayed.
[Parameter List]
grid
- gridView
index
- CellIndex
ListResult
return type of ListCallback or GridBase.onSearchCellButtonClick
Remarks:
When creating a list using ListCallback in IE11, you must add a Promise polyfill.
ListTemplateCallback
A callback used when the user writes an item displayed in the list in DropDownCellEditor or SearchCellEditor
Remarks:
[Parameter list]
grid
- gridView
index
- CellIndex
dom
- div element
value
- value
label
- label
item
- Information entered in DropDownCellEditor.listCallback or GridBase.fillEditSearchItems()
Example:
const columns = [
{
fieldName: "text",
name: "text",
editor: {
type: "list",
templateCallback: (grid, index, dom, value, label, item) => {
dom.innerHTML = '<img src="images/flags/'+item.flag+'.png" style="width:20px" class="dropdown-image"></img>'+
'<span> value = '+value+'></span>'+
'<span style="color:red"> label = '+label+'</span>'+
'<span style="background:lawngreen"> Country: '+item.name
}
}
}
]
LookupData
Model information to populate LookupSource
Remarks:
Used as a parameter when fillLookupData().
Example:
// When using the rows property
gridView.fillLookupData("empLookup", {
rows: [
["TOMSP", "5", "TOMSP_5X"],
["TOMSP", "6", "TOMSP_6X"]
]});
// When using key-value properties
gridView.fillLookupData("empLookup", {
keys: [
["TOMSP", "5", "TOMSP_5X"],
["TOMSP", "6", "TOMSP_6X"]
],
values: [
["TOMSP_5X"],
["TOMSP_6X"]
]});
MemoCallback
Format for specifying a callback to be executed when printing memos by cell in Export Excel Note
Remarks:
[Parameter List]
grid
- The grid being exported
itemIndex
- Index
dataRow
- the dataRow of the row
column
- Column name
cellMemo
- Memo information model for the cell
[Return Value] - CellMemo | string | undefined
Example:
gridView.exportGrid({
type:"excel",
target:"local",
exportMemo : {
validation: true,
callback: (grid, index, column, cellMemo) => {
if (column == "LiteralCol") {
cellMemo.author = 'Literal column author';
cellMemo.message = 'This is a literal column area.';
return cellMemo;
}
if (column === 'SaveCost') {
return "Message";
}
return false;
}
}
});
MenuItemClick
Callback called when a menu item is clicked
Remarks:
GridBase.onMenuItemClicked and GridBase.onContextMenuItemClicked, PopupMenuItem.callback.
[Parameter list]
grid - GridBase control
menuItem - MenuItem object
clickData - Information about the clicked item
Example:
grid.addPopupMenu("menu1", [
{
label: "alpha",
callback: function(grid, menuItem, clickData) {
console.log("aa")
console.log(menuItem);
console.log(clickData);
}
},
{label: "beta"},
{label: "gamma"}
]);
NumberOutputCallback
Callback function format to be performed when converting the number field
Remarks:
Used in DataOutputOptions.numberCallback.
[Parameter list]
ds
- DataProvider control
row
- the index of the item
field
- field name
value
- the value
[return value] - value to output
Example:
const f = function(ds, row, field, value) {
let v = Number(value);
return v === NaN ? 42:v;
}
MultiCheckDisabledCallback
Callback format that determines whether an item is disabled when rendering
Remarks:
Used in MultiCheckCellRenderer.disabledCallback.
[Parameter list]
grid
- GridBase control
itemIndex
- Order of items
column
- a column object
value
- value
[Return value] - Disabled or not
Example:
const f = function(grid, itemIndex, column, value) {
const state = grid.getValue(itemIndex, "stateColumn");
if (state === "A" && value === "Apple") {
return true; // If the state is "A" and the value is "Apple", it cannot be selected.
}
}
column.renderer = {
type: "multicheck",
disabledCallback: f
}
MultiCheckKeydownCallback
Callback type that determines the value to select or release on keydown in MultiCheckCellRenderer
Remarks:
Used in MultiCheckCellRenderer.keyToValueCallback.
[Parameter list]
grid
- GridBase control
itemIndex
- Order of items
column
- a column object
event
- KeyboardEvent object
values
- values
[return value] - value to select
Example:
const f = (grid, itemIndex, column, event, values) => {
if (event.ctrlKey && event.shiftKey) {
const idx = event.keyCode - 49; // When the shift key is pressed, the key is a special character
if (idx >= 0 && idx < values.length) {
return values[idx];
}
}
}
column.renderer = {
type: "multicheck",
keyToValueCallback: f
}
ObjectToValuesCallback
A callback called for each row when data in json format is entered into the data provider.
Remarks:
Used when the type of data delivered from the server is different from the fieldName set as fields or when the value is arbitrarily changed.
Example:
dataProvider.valuesCallback = function (ds, obj) {
let row = [];
if (obj) {
for (let i = 0, cnt = this.fieldCount; i < cnt; i++) {
let fld = this.getOrgFieldName(i);
let fName = Object.keys(obj).find(function(key) {return key.toLowerCase() === fld.toLowerCase()})
if (obj.hasOwnProperty(fName)) {
row[i] = obj[fName];
}
}
}
return row;
}
OuterSortCallback
Callback format specified by the user when performing sorting
Remarks:
To use it in IE11, you must add a Promise polyfill.
ProgressCallback
A format for specifying a callback to be performed when showProgress is true in Grid Export Settings
Remarks:
[Parameter list] grid
- If a grid or zip file is currently being exported, null is passed.
work
- If the Grid is called while creating Excel, process
is passed, and if it is called while creating a zip file, zip
is passed. Called if jsZIP supports generateAsync.
max
- maxPosition
position
- Current position
RealizeHeaderCallback
Callback format used in ColumnHeader.templateCallback or CellLayoutGroupHeader.templateCallback
Remarks:
Used to retrieve values that are not specified in values among the fields entered in the template of the column header.
[Parameter list]
grid
- GridBase control
header
- Column header or group layout header
field
- field name
[return value] - string
Example:
const f = function (grid, model, field) {
if (field == "field1") {
return "1234";
} else if (field === "field2") {
return "ABCD";
} else {
return "field Fail";
}
}
column.header.template =
"<img src='images/realgrid-logo.png' height='20'/>"+
"<span style='color: red;font-weight: bold;'>${field1}</span>"+
"<span style='color: blue'>${field2}</span>";
column.header.templateCallback = f;
RealizeSummaryCallback
Callback format used in ColumnSummary.templateCallback
Remarks:
ColumnFooter, HeaderSummary, Used to retrieve values that are not specified in values among the fields entered in the template of GroupFooter .
[Parameter list]
grid
- GridBase control
column
- column of the footer
summaryIndex
- sequence number of the footer
summary
- GroupItem for a footer
object or groupFooter
field
- field name
[return value] - string
Example:
const f = function (grid, column, summaryIndex, summary, field) {
if (field == "field1") {
return "1234";
} else if (field === "field2") {
return "ABCD";
} else {
return "field Fail";
}
}
column.footer.template =
"<img src='images/realgrid-logo.png' height='20'/>"+
"<span style='color: red;font-weight: bold;'>${field1}</span>"+
"<span style='color: blue'>${field2}</span>";
column.footer.templateCallback = f;
RealizeValueCallback
Callback format used in TemplateCellRenderer.valueCallback
Remarks:
[Parameter list]
grid
- GridBase control
model
- a cell in the grid
field
- field name
[Return value] - template format of string type
Example:
const f = function (grid, model, field) {
if (field == "xxx") {
return "1234";
}
}
column.renderer = {
type: "html",
template: "<img src='images/realgrid-logo.png' height='20'/>"+
"<span>${value}-${value:unitprice}-</span>"+
"<span style='color: red;font-weight: bold;'>${xxx}</span>"+
"<span style='color: blue'>${value:Country}</span>",
valueCallback: f
}
RowBarCellStyleCallback
Callback to specify cell style in RowBar area
Remarks:
This is the format used in CheckBar.cellStyleCallback.
[Parameter list] grid
- GridBase control
type
- One of check
, indicator
, state
among GridCellType
index
- the itemIndex of the cell
Example:
var f = function(grid, type, index) {
if (grid.getValue(index, "field") === "TEST") {
return 'style-test';
}
}
RowBlockCallback
Callback to set the row block mask
Remarks:
Used in DisplayOptions.rowBlockCallback. If DisplayOptions.rowBlockType is RowMaskType.NONE, it is not reflected.
[Parameter list]
grid
- GridBase control
itemIndex
- Index of the selected row
[Return value] - Range of rows to apply Row Block Mask to, start
: starting row, end
: ending row
Example:
const f = function(grid, itemIndex) {
let billNo;
let ds = grid.getDataSource();
let fld = ds.getFieldIndex("text1");
let dataRow = grid.getDataRow(itemIndex);
if (dataRow >= 0) {
billNo = ds.getValue(dataRow, fld);
} else {
billNo = null;
}
let top = Math.min(grid.getTopItem(), itemIndex);
let full = top + grid.fullItemCount();
let startNo = top + full;
let endNo = -1;
let check1 = false;
for (let i = top; i <= full; i++) {
dataRow = grid.getDataRow(i);
if (dataRow < 0) {
continue;
}
let cBillNo = ds.getValue(dataRow, fld);
if (cBillNo === billNo) {
startNo = Math.min(startNo, i), endNo = Math.max(endNo, i);
check1 = true;
} else {
if (check1) {
break;
}
}
};
if (startNo <= endNo && endNo > 0) {
console.log(startNo)
console.log(endNo);
return { start: startNo, end: endNo };
}
}
RowHeightCallback
Callback format that returns the height of the row
Remarks:
Specify the row height in the form of number or number[].
[Parameter list]
grid
- GridBase control
type
- [type] of row(/refs/realgrid#itemtype)
itemIndex
- itemIndex of the row
[Return value] - Row height, in case of a multi-line row, it is specified when returned as an array.
RowObject
row object
Remarks:
One of the formats of DataValues
RowStyleCallback
Callback for changing row style
Remarks:
Should return the style class name.
Used in GridBase.setRowStyleCallback().
[Parameter list]
grid
- GridBase control
item
- row item
fixed
- Is the line fixed?
[Return Value] - Style class name or RowStyleObject object
Example:
const f = function(grid, item, fixed) {
if (fixed) {
return 'custom-fixed-row';
}
else if (item.isDataRow) {
var val =
return 'custom-data-row';
}
}
gridView.setRowStyleCallback(f)
RowValues
row data
Remarks:
One of the formats of DataValues
ScrollMessageCallback
A callback type that returns a message displayed on the screen indicating the scroll position when livescroll is not applied.
Remarks:
Used in DisplayOptions.scrollMessageCallback.
[Parameter list]
grid
- GridBase control
isVertical
- Whether to scroll vertically
itemIndex
- Index of the item at the scroll position
[Return Value] - The text of the message displayed on the screen.
Example:
const f = function(grid, vertical, itemIndex) {
let msg = grid.getValue(itemIndex, "area3name");
return "<span style='color:blue;font-size:20px'>itemIndex = " + msg+"</span>";
}
SetCheckedCallback
Callback format that determines the check result value when editing
Remarks:
Used in CheckCellRenderer.setCheckedCallback.
[Parameter list]
grid
- GridBase control
itemIndex
- Order of items
column
- a column object
oldValue
- value before editing
checked
- Checked status before editing
[Return value] - Check result value
Example:
const f = function(grid, itemIndex, column, oldValue, checked) {
if (itemIndex % 2 === 0) {
return checked;
}
else if (itemIndex % 17 === 0) {
return oldValue
}
else {
return false;
}
}
SummaryCellSpanCallback
Callback to set custom headerSummary and footer spanning
Remarks:
Used in CellLayoutColumnItem.
[Parameter list] grid
- GridBase control
layout
- layout item
footerIndex
- the index of the footer
TreeIconCallback
A callback that specifies the icon displayed next to the tree expander.
[Parameter list]
TreeView
- tree view object
itemIndex
- the index of the row
dataRow
- the dataRow of the row
iconIndex
- the value of the original iconIndex
[Return value] - The url
of the icon or the sequence number of TreeOptions.iconImages
TreeTemplateEventCallback
Callback format used in TreeTemplateEvent.renderCallback
Remarks:
Called when the TreeRenderer is updated.
[Parameter List]
grid
- GridBase control
model
- cell information of the tree
element
- HTMLElement
initialize
- true
if called immediately after the element is created, and false
if called when the screen is updated.
Example:
treeView.treeOptions.templateOptions = {
template: `<span class='custom-class'></span>`,
events: [
selector: 'span.custom-class',
renderCallback(tree, model, element, initialize) {
element.dataset["datarow"] = model.index.dataRow;
element.innerHTML = model.value;
}
]
}
UserCellsCallback
If there is a callback GridExportOptions.userCells that is used when the user adds output cells, it is not performed.
Remarks:
[Parameter list] grid
- grid currently being exported
rowCount
- Number of rows in sheet
colCount
- Number of columns in the sheet
name
- the name of the sheet
[Return Value] - Array of UserExportCell
Example:
var callback = function(grid, rowCount, colCount, sheetName) {
return [{row:3, col: colCount -3, mergeCol: 3, text:"Show at the end of column", styles:{textAlign:"right"}}]
}
gridView.exportGrid({"type":"excel", "target":"local", "yOffset":4, userCellsCallback: callback});
ValueForGroupCallback
Although it is not the same value, it is used when the developer specifies a standard value when grouping it into one group. It must be returned with the same dataType as the dataType of the field.
Remarks:
This is the format used in RowGroup.valueForGroupCallback. [Parameter list]
grid
- GridBase control
dataRow
- dataRow
fieldName
- fieldName
value
- value
Example:
valueForGroupCallback = function(grid, dataRow, fieldName, value) {
if (value && fieldName === 'date1') {// Applies only to specific fields.
// Group data in date format using year and month.
return new Date(value.getFullYear(), value.getMonth());
};
// If it has not changed, the original value must be reutrn.
return value;
}