RealGrid2 API
Class
GridBase

GridBase

GridBase is the base class of GridView and TreeView.

Signature:

export declare abstract class GridBase

Remarks

All properties and methods of GridBase can be called only from subclasses that inherit it.

[subclass]

GridView

TreeView

Events

PropertyTypeDescription
onCellButtonClicked(grid: GridBase, index: CellIndex, column: [GridColumn](/refs/ Interface/GridColumn)) => voidCalled when the user clicks the action button inside a data cell.
onCellClicked(grid: GridBase, clickData: ClickData) => voidA callback indicating that a grid cell has been clicked
onCellDblClicked(grid: GridBase, clickData: ClickData) => voidA callback indicating that a grid cell has been double-clicked
onCellEdited(grid: GridBase, itemIndex: number, row: number, field: number) => voidA callback notifying that a field value of the edit item being modified or added has been edited
onCellItemClicked(grid: GridBase, index: CellIndex, clickData: [ClickData](/refs/ Interface/ClickData)) => booleanA callback notifying that an element contained in a grid cell has been clicked
onCellPasting(grid: GridBase, index: CellIndex, value: any, editResult: EditResult) => booleanA callback that determines what to paste into a cell
onColumnCheckedChanged(grid: GridBase, column: GridColumn, checked: boolean) => voidA callback notifying that the user clicks a column header checkbox
onColumnPropertyChanged(grid: GridBase, column: GridColumn, property: string, newValue: any, oldValue : any) => void
onCommandStackChanged(grid: GridBase, undoable: boolean, redoable: boolean) => voidA callback notifying that the CommandStack has changed
onContextMenuItemClicked(grid: GridBase, item: PopupMenuItem, clickData: [ClickData](/refs/ Interface/ClickData)) => voidA callback notifying the click of a context menu item added via setContextMenu()
onContextMenuPopup(grid: GridBase, x: number, y: number, clickData: ClickData, menu : string, rightClick: boolean) => boolean | stringA callback that determines the display of the ContextMenu with its coordinates
onCopy(grid: GridBase, selection: Selection | Selection[], event: ClipboardEvent) => booleanA callback that determines copying with the control + c keys
onCurrentChanged(grid: GridBase, newIndex: CellIndex) => voidA callback notifying the change in the position of the grid's focus cell
onCurrentChanging(grid: GridBase, oldIndex: CellIndex, newIndex: [CellIndex](/refs/ Interface/CellIndex)) => booleanA callback that determines the change in position of the grid's focus cell
onCurrentRowChanged(grid: GridBase, oldRow: number, newRow: number) => voidA callback notifying that the position of a data row has changed
onCut(grid: GridBase, selection: Selection | Selection[], event: ClipboardEvent) => booleanCallback to determine cut with control + x
onDataLoadComplated(grid: GridBase) => voidA callback that fires after the grid refresh is complete after executing dataProvider.setRows()
onEditCanceled(grid: GridBase, index: CellIndex) => voidA callback notifying that the user enters the ESCAPE key while editing or cancel() is called to cancel editing.
onEditChange(grid: GridBase, index: CellIndex, value: any) => voidCallback notifying that the value of an item has changed due to the user entering a key, etc.
onEditCommit(grid: GridBase, index: CellIndex, oldValue: any, newValue: any) = > booleanA callback that determines whether user input is reflected in the cell
onEditRowChanged(grid: GridBase, itemIndex: number, row: number, field: number, oldValue: any, newValue: any) => voidA callback notifying that the value changed by user input has been reflected in the row
onEditRowPasted(grid: GridBase, itemIndex: number, row: number, fields: number[], oldValues: any[], newValues: any[]) => voidA callback indicating that a grid cell has been pasted
onEditSearch(grid: GridBase, index: CellIndex, text: string) => voidA callback indicating that a search has been made
onErrorClicked(grid: GridBase, error: string) => voidA callback notifying that an error window in the grid has been clicked
onFiltering(grid: GridBase, column: DataColumn) => booleanCallback to determine filtering
onFilteringChanged(grid: GridBase, column: GridColumn, filter: ColumnFilter, reset: boolean) => voidA callback that notifies that a column has filters set and that the state of the filter has changed.
onGetEditValue(grid: GridBase, index: CellIndex, editResult: EditResult) => boolean | voidA callback that contains the cell position and edit result when cell editing is complete.
onGridActivated(grid: GridBase) => voidA callback indicating that the grid has been selected
onHideEditor(grid: GridBase, index: CellIndex) => voidA callback to indicate that editing is complete and the editor has disappeared
onItemAllChecked(grid: GridBase, checked: boolean) => voidA callback notifying that the user clicked on the header of the checkBar to select or deselect all, or entered checkAll true / false to select or deselect all
onItemChecked(grid: GridBase, itemIndex: number, checked: boolean) => voidA callback notifying that the user has changed a check by clicking a checkbox in checkBar or calling checkItem
onItemEditCancel(grid: GridBase, itemIndex: number, state: string) => booleanA callback that determines whether the user wants to cancel row editing
onItemEditCanceled(grid: GridBase, itemIndex: number, state: string) => void

Callback to indicate that the user canceled row editing

[Parameter list]

grid - GridBase control

itemIndex - Order of rows whose edits were canceled

state - Status of rows whose edits were canceled

onItemsChecked(grid: GridBase, items: number[], checked: boolean) => voidA callback notifying that the user has changed a check by clicking a checkbox in checkBar or calling checkItem
onKeyDown(grid: GridBase, event: KeyboardEvent) => booleanA callback that determines keystrokes
onKeyPress(grid: GridBase, event: KeyboardEvent) => voidA callback to indicate that a key is being entered
onKeyUp(grid: GridBase, event: KeyboardEvent) => voidA callback notifying that a key has been entered.
onLayoutCollapsed(grid: GridBase, layout: CellLayoutGroupItem) => voidA callback indicating that the group layout has been collapsed
onLayoutCollapsing(grid: GridBase, layout: CellLayoutGroupItem) => booleanCallback that determines group layout collapse
onLayoutExpanded(grid: GridBase, layout: CellLayoutGroupItem) => voidCallback notifying that the group layout has been expanded
onLayoutExpanding(grid: GridBase, layout: CellLayoutGroupItem) => booleanCallback that determines group layout expansion
onLayoutPropertyChanged(grid: GridBase, layout: CellLayoutItem, property: string, newValue: any, oldValue : any) => voidCallback notifying that displayWidth, displayIndex, and visible property values among Layout properties have changed
onLeftPosChanged(grid: GridBase, pos: number) => voidA callback notifying that the position of the horizontal scroll bar has changed
onMenuItemClicked(grid: GridBase, item: PopupMenuItem, clickData: [ClickData](/refs/ Interface/ClickData)) => voidCallback notifying that the added pop-up menu item is clicked
onPaste(grid: GridBase, index: CellIndex, event: ClipboardEvent) => booleanA callback that determines what to paste into the grid
onPasted(grid: GridBase) => voidA callback indicating that a paste has been made into the grid
onRowInserting(grid: GridBase, itemIndex: number, dataRow: number) => booleanA callback that determines whether the user inserts a new row by pressing the Insert key or adds a row by pressing the down arrow on the last row
onRowsDeleting(grid: GridBase, rows: number[]) => boolean

When the user presses Ctrl+Del or deletes with deleteSelection(), a callback that determines the actual deletion

[Parameter list\ ]

grid - GridBase control

rows - Array of data row orders of the rows to be deleted

[Return value] - null If a value other than that is returned, the specified text is displayed and deletion is canceled.

onRowsPasted(grid: GridBase, items: number[]) => voidA callback to indicate that multiple rows have been pasted
onScrollToBottom(grid: GridBase) => voidA callback called when the last row is displayed in the grid by the user operating the keyboard, scroll bar, etc.
onSearchCellButtonClick(grid: GridBase, index: CellIndex, text: string) => voidA callback indicating that a button was clicked in SearchCellEditor
onSelectionAdded(grid: GridBase, selection: Selection) => voidA callback notifying that a new selection area has been added
onSelectionChanged(grid: GridBase, selection: Selection) => voidA callback notifying that the user has changed the size of the selection using the mouse or keyboard
onSelectionCleared(grid: GridBase) => voidA callback notifying that the existing selection area has been removed when the user changes the selection area with the mouse or keyboard
onSelectionEnded(grid: GridBase, selection: Selection) => voidA callback to notify the user that the selection area has been changed with the mouse
onShowEditCommand(grid: GridBase, index: CellIndex) => booleanA callback that determines whether to display the editCommand displayed on mobile
onShowEditor(grid: GridBase, index: CellIndex, props: any, attrs: any) = > booleanA callback that determines the display of the Editor opened for each cell
onShowHeaderTooltip(grid: GridBase, column: GridColumn, value: any, layout: CellLayoutItem) => stringCallback to notify that the column header tooltip has been shown
onShowTooltip(grid: GridBase, index: CellIndex, value: any) => boolean | stringA callback to indicate that a data cell's tooltip has been displayed
onSorting(grid: GridBase, fields: number[], directions: string[]) => booleanCallback to determine sorting
onSortingChanged(grid: GridBase) => voidCallback to indicate sorting
onTopIndexChanged(grid: GridBase, itemIndex: number) => voidA callback notifying that the position of the vertical scroll bar has changed
onTopIndexChanging(grid: GridBase, currentTop: number, delta: number, focusing: boolean, adjust: boolean) => numberCallback called when gridView.topIndex changes
onValidateColumn(grid: GridBase, column: DataColumn, inserting: boolean, value: any, itemIndex: number, dataRow: number) => ValidationError | undefinedA callback that determines the result of user validation via Javascript when editing a cell is complete and moving to another cell.
onValidateRow(grid: GridBase, itemIndex: number, dataRow: number, inserting: boolean, values: any[]) => ValidationErrorCallback to determine row-wise user verification result via Javascript
onValidationFail(grid: GridBase, itemIndex: number, column: GridColumn, error: [ValidationError] (/refs/Interface/ValidationError)) => ValidationErrorCallback that occurs when validation fails
onWheel(grid: GridBase, event: WheelEvent) => booleanCallback notifying that a Wheel Event has occurred

Constructors

ConstructorModifiersDescription
(constructor)(container, accessibility, waiOptions)Constructs a new instance of the GridBase class

Properties

PropertyTypeDescription
checkBarCheckBarConfiguration model for grid checkbars
copyOptionsCopyOptionsSettings model for copying to clipboard
dataDropOptionsDataDropOptionsSetting model related to data drag and drop
disabledbooleanGrid does not respond to mouse/keyboard events
displayOptionsDisplayOptionsSetting model for display information managed at grid level
editOptionsEditOptionsSetting model for data editing
editorOptionsEditorOptionsSetting model for editor
filteringOptionsFilteringOptionsSettings model for data filtering
filterPanelFilterPanel
fixedOptionsFixedOptionsSetting model for fixed rows and columns in grid
footerGridFooterConfiguration model for first footer
footersGridFooterCollectionConfiguration model for footers
formatOptionsFormatOptionsSetting model for conversion format of data field values
headerGridHeaderConfiguration model for grid header area
headerSummariesHeaderSummaryCollectionCollection settings model for Header Summary displayed in grid header area
headerSummaryHeaderSummarySetting model for the first Header Summary displayed in the grid header area
hideDeletedRowsbooleanWhether to hide deleted rows set in the grid
mobileOptionsMobileOptionsMobile-specific settings model
onGridFocusChanged(grid: GridBase, focused: boolean, event: Event) => void

A callback that notifies the grid that it has or loses focus

[Parameter List] grid - GridBase control focused - Whether it is focused event - Event object

pasteOptionsPasteOptionsConfiguration model for pasting data from clipboard
redoingbooleanIs it possible to rerun in the current state?
rowIndicatorRowIndicatorConfiguration model for grid indicators
scrollBarHeightnumberChange the height of the scrollbar
scrollBarWidthnumberChange the width of the scrollbar
sortingOptionsSortingOptionsSet model for data sorting
sortModeSortModeSort operation mode after data modification
stateBarStateBarSetting model for grid status bar
summaryModeSummaryModeHow to calculate sum of current grid
undoablebooleanAvailability of undo function
undoingbooleanIs it possible to undo in the current state?

Methods

MethodTypeDescription
activateAllColumnFilters(column, active)activateAllColumnFilters(column: string | DataColumn, active: boolean): void;Apply or cancel all filters registered in the column.
activateColumnFilters(column, filterNames, active)activateColumnFilters(column: string | DataColumn, filterNames: string | string[], active: boolean): void;Among the filters registered in the column, apply or disable filters with filter names included in filterNames.
addColumn(column, index)addColumn(column: ConfigObject | string, index?: number): GridColumn;Set additional columns in addition to the set columns.
addColumnFilters(column, filters, overwrite)addColumnFilters(column: string | DataColumn, filters: ColumnFilter[], overwrite ?: boolean): void;Register one or more filters in a column. Not applied if column.autoFilter is true.
addLayout(source, index)addLayout(source: LayoutItem | string, index?: number): LayoutItem;Add a column or group to the layout.
addLookupSource(source)addLookupSource(source: LookupSource): void;Add and register LookupSource to be used in the lookup tree.
addPopupMenu(name, menuItems)addPopupMenu(name: string, menuItems: (PopupMenu | PopupMenuItem)[]): void;Add a Popup Menu to the grid.
addSelection(item, eventFire)addSelection(item: Selection, eventFire?: boolean): void;Add an area to select in the grid.
addUserCellStyle(dataRow, column, style)addUserCellStyle(dataRow: number, column: string | -1, style: string | ColumnStyleObject): void;Specifies the style of the cell.
applyCheckables()applyCheckables(): void;Apply checkable to CheckBar based on Expression.
autoFiltersRefresh(columns, applyFilters)autoFiltersRefresh(columns: string[] | DataColumn[], applyFilters: boolean): void;If column.autoFilter is true, the filter list is updated.
beginUpdate()beginUpdate(): void;Whenever grid-related properties are changed, an update lock is applied to delay the internal change processing call.
cancel()cancel(): boolean;Cancels editing of the row currently being edited.
cancelEditor()cancelEditor(): void;Cancel editing and close the editor window.
checkAll(checked, visibleOnly, checkableOnly, checkEvent)checkAll(checked?: boolean, visibleOnly?: boolean, checkableOnly?: boolean, checkEvent?: boolean): void;Check and uncheck all data rows in the grid.
checkItem(itemIndex, checked, exclusive, checkEvent)checkItem(itemIndex: number, checked?: boolean, exclusive?: boolean, checkEvent?: boolean): void;Check or uncheck the specified item.
checkItems(itemIndices, checked, checkEvent)checkItems(itemIndices: number[], checked?: boolean, checkEvent?: boolean): void;Check or uncheck the items corresponding to the entered item array.
checkModel(model, checked, exclusive, checkEvent)checkModel(model: GridItem, checked?: boolean, exclusive?: boolean, checkEvent?: boolean): void;Checks or unchecks the specified GridItem.
checkRow(row, checked, exclusive, checkEvent)checkRow(row: number, checked?: boolean, exclusive?: boolean, checkEvent?: boolean): void;Checks or unchecks the specified data row.
checkRows(rows, checked, checkEvent)checkRows(rows: number[], checked?: boolean, checkEvent?: boolean): void;Check or uncheck the items connected to the unique row numbers entered.
clearColumnFilters(column)clearColumnFilters(column: string | DataColumn): void;Removes filters registered in a column. Not applied if column.autoFilter is true.
clearCommandStack(all)clearCommandStack(all?: boolean): void;Initialize the Command Stack.
clearCurrent()clearCurrent(): void;Remove focus.
clearInvalidCells()clearInvalidCells(): void;Delete cell information that failed value verification.
clearLookupData(sourceId)clearLookupData(sourceId: string): void;Clears the lookup source corresponding to the specified SourceId.
clearRowHeights(all)clearRowHeights(all: boolean): void;Returns the height of individual rows where changes have been applied to the initial value.
clearSelection()clearSelection(): void;Removes all selected areas.
closeList()closeList(): void;Close the filter box or DropDown Editor.
closeLoading()closeLoading(): void;Hide loading animation.
closeProgress()closeProgress(): void;Close the progress bar.
columnByField(fieldName)columnByField(fieldName: string): DataColumn;Returns information on the first column connected to the data field specified by the field name.
columnByName(name)columnByName(name: string): DataColumn;Returns column setting information using the column name.
columnByTag(tag)columnByTag(tag: any): GridColumn;Retrieves a column with the entered tag value.
columnsByTag(tag)columnsByTag(tag: any): GridColumn[];Columns with input tag values are brought into an array.
commit(force)commit(force?: boolean): boolean;Complete editing of the row being edited and save it to DataProvider.
commitEditor(hideEditor, force)commitEditor(hideEditor?: boolean, force?: boolean): boolean;Reflects the contents of the current editor to the cell.
copyToClipboard(selection, copy)copyToClipboard(selection: Selection, copy?: boolean): string;Copies or returns information on cells included in the selected area.
deleteSelection(force)deleteSelection(force?: boolean): void;Deletes rows in the current selection area.
destroy()destroy(): any;Turn off the grid.
endUpdate(force)endUpdate(force: boolean): void;Release the update lock and redraw the grid.
eraseSelection(force)eraseSelection(force?: boolean): void;Deletes the values of cells in the selection area. In other words, change the value to undefined.
existsCustomRenderer(type)existsCustomRenderer(type: string): boolean;Check if there is a user renderer.
existsLookupData(sourceId, keys)existsLookupData(sourceId: string, keys: string | string[]): boolean;Returns whether the specified key exists in the specified lookupsource.
exportGrid(options)exportGrid(options: GridExportOptions): void;The shape and data of the current grid are exported to an external document according to the specified settings.
fillEditSearchItems(column, searchKey, values, labels, items)fillEditSearchItems(column: string | GridColumn, searchKey: string, values?: string[], labels?: string[], items?: ListResult): void;Items related to the input value are searched and displayed in the list. Used for partial search purposes.
fillLookupData(sourceId, data)fillLookupData(sourceId: string, data: LookupData): void;Add lookupData to lookupSource.
fitLayoutWidth(layout, maxWidth, minWidth, includeHeaderText, includeFooterText)fitLayoutWidth(layout?: string | LayoutItem, maxWidth?: number, minWidth?: number, includeHeaderText?: boolean, includeFooterText?: boolean): number;Change the cell width to match the character length.
fullItemCount()fullItemCount(): number;Returns the number of items displayed on the screen, excluding rows where only some of them are visible.
getActiveColumnFilters(column, active)getActiveColumnFilters(column: string | DataColumn, active?: boolean): ColumnFilter[ ];Returns the name of the applied or canceled filter among registered filters.
getCellBounds(itemIndex, column, outer)getCellBounds(itemIndex: number, column: string | GridColumn, outer?: boolean): Rectangle;Returns the coordinate values of the specified cell in the grid.
getCheckBar()getCheckBar(): CheckBar;Returns configuration information related to the grid check bar to the model of CheckBar.
getChildModel(parentModel, index, extended)getChildModel(parentModel: GridItem, index: number, extended?: boolean): GridItem;Returns the child model of the item model.
getChildModels(parentModel, extended)getChildModels(parentModel: GridItem, extended?: boolean): GridItem[];Returns the child models of the item model.
getColumn(index)getColumn(index: number): GridColumn;Returns the column at the corresponding index.
getColumnFilter(column, filterName)getColumnFilter(column: string | DataColumn, filterName: string): ColumnFilter;Returns the filter corresponding to the filter name in the specified column.
getColumnFilters(column)getColumnFilters(column: string | DataColumn): ColumnFilter[];Returns filters from the specified column.
getColumnNames(columnsOnly, visibleOnly)getColumnNames(columnsOnly?: boolean, visibleOnly?: boolean): string[];Returns the columns set in the grid.
getColumnProperty(column, prop)getColumnProperty(column: string | GridColumn, prop: string): any;Returns the properties of the corresponding column.
getColumns()getColumns(): GridColumn[];Returns the columns set in the grid.
getContainer()getContainer(): HTMLDivElement;Returns the div where the grid is located.
getCopyOptions()getCopyOptions(): CopyOptions;When copying the grid using ctrl+c, the settings applied are returned to the CopyOptions model.
getCurrent()getCurrent(): CellIndex;Returns the location information of the currently focused cell.
getDataDropOptions()getDataDropOptions(): DataDropOptions;Setting information related to data drag and drop is returned to the DataDropOptions model.
getDataRow(itemIndex)getDataRow(itemIndex: number): number;Returns the unique number of the specified grid row.
getDataSource()getDataSource(): LocalDataProvider | LocalTreeDataProvider;Returns the DataProvider connected to the grid.
getDescendantModels(parentModel, extended)getDescendantModels(parentModel: GridItem, extended?: boolean): GridItem[];Returns the child models of the item model.
getDisplayColumns()getDisplayColumns(): GridColumn[];Returns the currently displayed columns.
getDisplayOptions()getDisplayOptions(): DisplayOptions;Setting information related to grid display is returned to the model of DisplayOptions.
getDisplayValues(itemIndex, useColumnName)getDisplayValues(itemIndex: number, useColumnName?: boolean): object;Returns the data values of the specified row as a JSON object with various formats or regular expressions applied.
getDisplayValuesOfRow(dataRow, useColumnName)getDisplayValuesOfRow(dataRow: number, useColumnName?: boolean): object;Returns the data values of the row specified by the row unique number as a JSON object with various formats or regular expressions applied.
getDistinctItemValues(field, maxCount, sortDir)getDistinctItemValues(field: number | string, maxCount?: number, sortDir?: SortDirection): any[];Returns non-duplicate values of the field.
getEditingItem()getEditingItem(): EditingItemInfo;The grid returns information about the item being edited.
getEditOptions()getEditOptions(): EditOptions;Information related to the grid editing method is returned to the EditOptions model.
getEditorOptions()getEditorOptions(): EditorOptions;Returns editor display information in the EditorOptions model.
getEditValue()getEditValue(): any;When the grid is being edited, the value of the cell currently being edited is returned.
getFilteredRows(sort)getFilteredRows(sort?: boolean): number[];
getFilteringOptions()getFilteringOptions(): FilteringOptions;Setting information related to grid filtering is returned to the FilteringOptions model.
getFixedOptions()getFixedOptions(): FixedOptions;Setting information about the grid fixed area is returned to the model of FixedOptions.
getFooter()getFooter(): GridFooter;Returns configuration information related to the first grid footer to the GridFooter model.
getFooters()getFooters(): GridFooterCollection;Configuration information for grid footersGridFooterCollection Returns as a model.
getFormatOptions()getFormatOptions(): FormatOptions;Returns FormatOptions of the grid.
getGroupModel(itemIndex, extended)getGroupModel(itemIndex: number, extended?: boolean): GridItem;Returns the group model corresponding to itemIndex.
getGroupSummary(model, field, statistical)getGroupSummary(model: GridItem, field: string, statistical?: boolean): GroupSummary;Returns the total information of the specified group item model.
getHeader()getHeader(): GridHeader;Configuration information related to the grid header is returned to the GridHeader model.
getHeaderSummaries()getHeaderSummaries(): HeaderSummaryCollection;Returns the setting information of grid header summaries to the HeaderSummaryCollection model.
getHeaderSummary()getHeaderSummary(): HeaderSummary;Returns configuration information related to the first grid header summary to the HeaderSummary model.
getIndexOfElement(element)getIndexOfElement(element: HTMLElement): CellIndex;Returns the location information of the cell to which the HTMLElemnt belongs.
getInvalidCells(itemIndex)getInvalidCells(itemIndex?: number): InvalidCell[];Returns cell information that failed value verification.
getInvalidCellsOfRow(dataRow)getInvalidCellsOfRow(dataRow: number): InvalidCell[];Among the cell information performed for value verification, the information corresponding to the entered dataRow is returned.
getItemCount()getItemCount(): number;Returns the number of Grid Items currently displayed in the grid.
getItemIndex(dataRow)getItemIndex(dataRow: number): number;Returns the row order by the row's unique number.
getItemsOfRows(rows)getItemsOfRows(rows: number[]): number[];Returns the order of the rows using the unique numbers of the input data rows.
getItemState(itemIndex)getItemState(itemIndex: number): ItemState;Returns the status value of the item.
getJsonRows()getJsonRows(): object[];
getLayoutByColumn(column)getLayoutByColumn(column: string | GridColumn): CellLayoutColumnItem;Returns the layout information of the corresponding column.
getLeftPos()getLeftPos(): number;Returns the x-coordinate value of the column displayed on the leftmost screen.
getLookupData(sourceId, keys)getLookupData(sourceId: string, keys: string | string[]): LookupDataKeyValues;If there is a specified key in the specified lookupSource, keys and values are returned.
getMobileOptions()getMobileOptions(): MobileOptions;Returns mobile-related setting information in the MobileOptions model.
getModel(itemIndex, extended)getModel(itemIndex: number, extended?: boolean): GridItem;Returns the model corresponding to itemIndex.
getModelAs(itemIndex, itemType, extended)getModelAs(itemIndex: number, itemType?: ItemType, extended?: boolean): GridItem ;Returns the model corresponding to itemIndex and itemType.
getModelOfRow(dataRow, extended)getModelOfRow(dataRow: number, extended?: boolean): GridItem;Returns the item model corresponding to the row unique number.
getModels(itemIndices, extended)getModels(itemIndices: number | number[], extended?: boolean): GridItem[];Returns item models corresponding to the indices of the specified item.
getModelsOfRows(dataRows, extended)getModelsOfRows(dataRows: number | number[], extended?: boolean): GridItem[];Returns item models corresponding to row unique numbers.
getOptions()getOptions(): GridOptions;Returns grid option information.
getParentModel(model, extended)getParentModel(model: GridItem, extended?: boolean): GridItem;Returns the parent item model of the item model.
getPasteOptions()getPasteOptions(): PasteOptions;Settings applied when pasting into the grid are PasteOptions Returns as a model.
getPopupMenu(name)getPopupMenu(name: string): PopupMenu;Returns pop-up menu setting information.
getRootModel(model, extended)getRootModel(model: GridItem, extended?: boolean): GridItem;Returns the item model's highest ancestor item model.
getRowHeight(itemIndex)getRowHeight(itemIndex: number): number;Returns the row height.
getRowIndicator()getRowIndicator(): RowIndicator;Configuration information related to the grid indicator is returned to the RowIndicator model.
getRowsOfItems(items)getRowsOfItems(items: number[]): number[];Returns the unique numbers of the specified grid rows.
getSelectedItems(dataOnly)getSelectedItems(dataOnly: boolean): number[];Returns the indices of rows in the current selection.
getSelectedRows()getSelectedRows(): number[];Returns the unique numbers of data rows in the current selection area.
getSelection(index)getSelection(index?: number): Selection;Returns information on the currently selected area.
getSelectionData(maxRows, index)getSelectionData(maxRows?: number, index?: number): RowObject[];Returns the values of cells included in the current selection area.
getSelections()getSelections(): Selection[];Returns information on the currently selected area in array form.
getSelectionsData()getSelectionsData(): RowObject[][];Returns the values of cells included in the current selection area.
getSortedFields()getSortedFields(): SortedFields[];Returns sorting information for currently sorted fields.
getSortingOptions()getSortingOptions(): SortingOptions;Setting information related to grid sorting is returned to the SortingOptions model.
getStateBar()getStateBar(): StateBar;Returns the grid status bar setting information to the model of StateBar.
getSummary(field, type)getSummary(field: string | number, type: SummaryType): number;Returns the total value of the field.
getTopItem()getTopItem(): number;Returns the index of the specified row at the top of the grid.
getUserCellStyle(dataRow, column)getUserCellStyle(dataRow: number, column: string | -1): string | ColumnStyleObject;Imports the style specified with addUserCellStyle.
getValue(itemIndex, field, editing)getValue(itemIndex: number, field: string | number, editing?: boolean): any;Returns the value of the data cell specified by the row order and data field index.
getValues(itemIndex)getValues(itemIndex: number): object;Returns the data values of the specified row as a JSON object.
getWritable(itemIndex, column)getWritable(itemIndex: number, column: string): boolean;Returns whether the cell is editable.
hideAllColumnFilters(column, hide)hideAllColumnFilters(column: string | DataColumn, hide?: boolean): void;Hide or show all filters registered in a column. Not applied if column.autoFilter is true.
hideColumnFilters(column, filterNames, hide)hideColumnFilters(column: string | DataColumn, filterNames: string | string[], hide?: boolean): void;Among the filters registered in the column, filters with filter names included in filterNames are hidden or displayed. Not applied if column.autoFilter is true.
hideEditor()hideEditor(): void;Closes the editor currently open in the grid.
hideToast(action)hideToast(action: VoidFunction): void;Hide the Toast pop-up window.
indeterminateItem(itemIndex, indeterminate)indeterminateItem(itemIndex: number, indeterminate?: boolean): void;Changes the specified item to the indeterminate state or removes it.
indeterminateModel(model, indeterminate)indeterminateModel(model: GridItem, indeterminate: boolean): void;Changes the indeterminate state of the corresponding model.
indeterminateRow(row, indeterminate)indeterminateRow(row: number, indeterminate?: boolean): void;Changes the specified data row to the indeterminate state or removes it.
inlineFilterFocus(column)inlineFilterFocus(column: string): void;Focuses on the input in the filter panel.
isAllChecked()isAllChecked(): boolean;Returns whether all items are checked.
isCheckable(itemIndex)isCheckable(itemIndex: number): boolean;Returns whether the checkbar is checkable with the specified item index.
isCheckableModel(model)isCheckableModel(model: GridItem): boolean;Returns whether the specified GridItem is checkable.
isCheckableOfRow(dataRow)isCheckableOfRow(dataRow: number): boolean;Returns whether the checkbar is checkable with the unique number of the specified item.
isCheckedItem(itemIndex)isCheckedItem(itemIndex: number): boolean;Returns true if the checkbar is checked.
isCheckedModel(model)isCheckedModel(model: GridItem): boolean;Whether the specified GridItem is checked.
isCheckedRow(row)isCheckedRow(row: number): boolean;Whether the row is checked
isEditing()isEditing(): boolean;Returns true if the cell is currently being edited.
isFiltered(column)isFiltered(column?: string | DataColumn): boolean;Returns whether a specific column in the grid is filtered.
isIndeterminateItem(itemIndex)isIndeterminateItem(itemIndex: number): boolean;If the check bar is indeterminate, return true.
isIndeterminateModel(model)isIndeterminateModel(model: GridItem): boolean;If the check bar is indeterminate, return true.
isIndeterminateRow(row)isIndeterminateRow(row: number): boolean;Whether the row is indeterminate
isItemEditing()isItemEditing(): boolean;If cell editing is finished but not committed, return true if editing is in progress.
isVisible()isVisible(): boolean;Returns true if the grid is displayed.
layoutByColumn(column)layoutByColumn(column: string): CellLayoutColumnItem;Finds the layout setting information of the column using the column name.
layoutByName(name)layoutByName(name: string): LayoutItem;Finds the layout setting information using the layout name.
linearizeColumns(sortProps)linearizeColumns(sortProps?: string[]): void;Remove all column groups and arrange only the columns that display data values ​​in a single line.
mouseToIndex(x, y, coordianteByBody)mouseToIndex(x: number, y: number, coordianteByBody?: boolean): ConfigObject;Returns the location information of the cell corresponding to the (x, y) coordinate.
orderBy(fieldNames, sortDirs, textCases)orderBy(fieldNames?: string[] | string, sortDirs?: SortDirection[] | SortDirection, textCases?: SortCase[] | SortCase): void;Sorts Grid Items based on one or more data fields.
ping(message)ping(message: any): void;Displays the message entered in the alert window.
redo()redo(): boolean;When undoing a datasource connected to the grid, it returns to the state after modification.
refresh(force)refresh(force?: boolean): void;Redraws the grid internally.
registerColumnLayouts(layouts)registerColumnLayouts(layouts: { name: string; items: (string | LayoutItem)[]; }[]): void;Register column layouts in advance.
registerCustomRenderer(type, renderer)registerCustomRenderer(type: string, renderer: CustomCellRenderer): void;Register a custom renderer.
removeColumn(name)removeColumn(name: string): boolean;Remove the corresponding column.
removeColumnFilters(column, filterNames)removeColumnFilters(column: string | DataColumn, filterNames: string | string[]): void;Among the filters registered in the column, filters with filter names included in filterNames are removed. Not applied if column.autoFilter is true.
removeLayout(layout)removeLayout(layout: LayoutItem | string): void;

Remove layout.

Cannot be used if layout is not set. It must be used after changing to the layout state using gridView.setColumnLayout.

removeLookupSource(sourceId)removeLookupSource(sourceId: string): void;Deletes the specified lookup source.
removePopupMenu(name)removePopupMenu(name: string): void;Remove a specific Popup Menu from the grid.
removeUserCellStyle(dataRow, column)removeUserCellStyle(dataRow?: number | null, column?: string | -1 | null): void;Removes the style specified with addUserCellStyle.
requestPrepareEditor()requestPrepareEditor(): void;After editing is complete, the cell's editor is updated when the screen is redrawn.
resetCheckables(clearExpression)resetCheckables(clearExpression: boolean): void;Initializes the Checkable state of all rows applied to CheckBar.
resetCurrent()resetCurrent(): void;Initialize the position of the focus cell to the first row and first column.
resetFilters()resetFilters(): void;Releases filters registered in all columns of the grid.
resetSize(callback)resetSize(callback?: any): void;Change the size of the upper DIV area of the grid explicitly when the size of the grid does not change.
restoreColumns()restoreColumns(): void;Returns the grid column positions to their initial state.
saveColumnLayout()saveColumnLayout(): LayoutInfo[];Returns layout information of the current screen.
scrollPage(offset)scrollPage(offset: number): void;Move the page based on the current time.
searchCell(options)searchCell(options: SearchCellOptions): any;Finds the cell corresponding to the values of the specified fields and returns CellIndex.
searchItem(options)searchItem(options: SearchOptions): number;Finds the first row corresponding to the values of the specified fields and returns the row number.
setAllCheck(checked, itemChecked)setAllCheck(checked?: boolean, itemChecked?: boolean): void;Check or uncheck all data rows in the grid using the options set in CheckBar.
setCellStyleCallback(f)setCellStyleCallback(f: CellStyleCallback | undefined): void;Change the cell style.
setCheckable(itemIndex, value)setCheckable(itemIndex: number, value: boolean): void;Specifies whether the check bar of the specified item can be checked.
setCheckableCallback(callback, apply)setCheckableCallback(callback?: CheckableCallback, apply?: boolean): void;Set checkableCallback in CheckBar and apply it. Or perform them simultaneously.
setCheckableExpression(expression, apply)setCheckableExpression(expression: string, apply?: boolean): void;Set checkableExpression in CheckBar and apply it. Or perform them simultaneously.
setCheckableOfRow(dataRow, value)setCheckableOfRow(dataRow: number, value: boolean): void;Specifies whether the check bar of the specified row can be checked.
setCheckBar(value)setCheckBar(value: CheckBar): void;Set the grid check bar's configuration information to the model of CheckBar.
setColumn(value)setColumn(value: ConfigObject): void;Change the information of the column set in the grid.
setColumnFilters(column, filters)setColumnFilters(column: string | DataColumn, filters: ColumnFilter[]): void;Set a filter on the grid column.
setColumnLayout(layout)setColumnLayout(layout?: string | (string | LayoutItem)[]): void;Set the column layout of the grid.
setColumnProperty(column, prop, value)setColumnProperty(column: string | GridColumn, prop: string, value: any): void;Change specific attribute information of a column set in the grid.
setColumns(columns)setColumns(columns: (DataColumn | SeriesColumn | LiteralColumn | [ConfigObject](/refs /realgrid#configobject) | string)[]): void;Remove all previously set columns and reorganize the grid with new columns.
setContextMenu(menuItems)setContextMenu(menuItems: (PopupMenu | PopupMenuItem)[]): [PopupMenu](/refs/Interface /PopupMenu);Specify menu items to be added to the context menu displayed when right-clicking on the grid.
setCopyOptions(options)setCopyOptions(options: CopyOptions): void;Set copy information to the CopyOptions model.
setCurrent(current, select)setCurrent(current: CellIndex, select?: boolean): void;Specifies the location of the focus cell.
setDataDropOptions(options)setDataDropOptions(options: DataDropOptions): void;Configuration information related to data drag and drop is set to the DataDropOptions model.
setDataSource(dataProvider)setDataSource(dataProvider: LocalDataProvider | LocalTreeDataProvider): void;Connect the Data Provider to the grid.
setDisplayOptions(options)setDisplayOptions(options: DisplayOptions): void;Set grid display information to the DisplayOptions model.
setEditOptions(options)setEditOptions(options: EditOptions): void;Information related to the grid editing method is reset to the EditOptions model.
setEditorOptions(options)setEditorOptions(options: EditorOptions): void;Set the editor display information to the EditorOptions model.
setEditValue(value, startEdit, dropdown)setEditValue(value: any, startEdit?: boolean, dropdown?: boolean): void;Sets the value in the cell where focus is located.
setFilteringOptions(options)setFilteringOptions(options: FilteringOptions): void;Set information related to grid filtering in the FilteringOptions model.
setFilterPanel(value)setFilterPanel(value: FilterPanel): void;Set the filter panel setting information to the FilterPanel model.
setFixedOptions(options)setFixedOptions(options: FixedOptions): void;Set information about the grid fixed area as a model in FixedOptions.
setFocus()setFocus(): void;The grid is focused.
setFooter(value)setFooter(value: GridFooter): void;Set the configuration information of the first grid footer to the GridFooter model.
setFooters(value)setFooters(value: GridFooterCollection | GridFooter[]): void;Set the grid footer configuration information to the collection model of GridFooter.
setFormatOptions(options)setFormatOptions(options: FormatOptions): void;Set FormatOptions of the grid.
setHeader(value)setHeader(value: GridHeader): void;Set the grid header setting information to the GridHeader model.
setHeaderSummaries(value)setHeaderSummaries(value: HeaderSummaryCollection | HeaderSummary[]): void;Set grid header summaries to the HeaderSummaryCollection model.
setHeaderSummary(value)setHeaderSummary(value: HeaderSummary): void;Set the configuration information of the first grid header summary to the HeaderSummary model.
setLeftCol(column)setLeftCol(column: string | number): void;The specified column is located on the left border of the grid.
setLeftPos(position)setLeftPos(position: number): void;The left border of the grid is located at the specified value.
setLookups(sources)setLookups(sources: LookupSource[]): void;Register lookup sources to be used in the lookup tree.
setMobileOptions(options)setMobileOptions(options: MobileOptions): void;Set mobile-related setting information using the MobileOptions model.
setOptions(options)setOptions(options: GridOptions): void;Reset grid option information.
setPasteOptions(options)setPasteOptions(options: PasteOptions): void;Set paste information in the grid using the PasteOptions model.
setProgress(min, max, position, message)setProgress(min: number, max: number, position: number, message?: string): void;Sets the state of the progress bar.
setRowHeight(itemIndex, height, refresh)setRowHeight(itemIndex: number, height?: number, refresh?: boolean): void;Change the row height to the specified height.
setRowIndicator(value)setRowIndicator(value: RowIndicator): void;Set the configuration information related to the grid indicator to the RowIndicator model.
setRowStyleCallback(f)setRowStyleCallback(f?: RowStyleCallback): void;Change the row style.
setSelection(item, eventFire)setSelection(item: Selection, eventFire?: boolean): void;Specifies the area to select in the grid.
setSortingOptions(options)setSortingOptions(options: SortingOptions): void;Set information related to grid sorting in the SortingOptions model.
setStateBar(value)setStateBar(value: StateBar): void;Set the grid status bar setting information to the model of StateBar.
setTopItem(itemIndex)setTopItem(itemIndex?: number): void;It is located in the specified row at the top of the grid.
setValidations(value)setValidations(value: EditValidation[] | EditValidation | string | string[]): void;Sets a list of row-level edit verification conditions.
setValue(itemIndex, field, value)setValue(itemIndex: number, field: string | number, value: any): void;Change the row order and the value of the data cell specified by the data field index.
setValues(itemIndex, values, strict)setValues(itemIndex: number, values: any[] | object, strict?: boolean): void;Modifies the values of multiple fields in a specified row.
setVisible(value)setVisible(value: boolean): void;Show or hide the grid.
showEditor(dropdown)showEditor(dropdown?: boolean): void;Displays the grid editor in the currently located cell.
showFilterSelector(column, searchText)showFilterSelector(column: string, searchText?: string): boolean;Displays the filter selector.
showLoading(disabled)showLoading(disabled?: boolean): void;Display loading animation.
showMessage(message, x, y)showMessage(message: string | TooltipOptions, x: number | CellIndex, y?: number): void;Displays a message in a cell or a specified location on the screen.
showProgress()showProgress(): void;Displays a progress bar.
showToast(options, force)showToast(options: ToastOptions, force?: boolean): void;Displays the Toast pop-up window.
toggleAllColumnFilters(column)toggleAllColumnFilters(column: string | DataColumn): void;Toggles all filters specified for the corresponding column.
toggleColumnFilters(column, filterNames)toggleColumnFilters(column: string | DataColumn, filterNames: string | string[]): void;Toggles the specified filters for the corresponding column.
undo()undo(): boolean;Returns the datasource connected to the grid to its previous state.
unregisterAllCustomRenderer()unregisterAllCustomRenderer(): void;Unregister all custom renderers.
unregisterCustomRenderer(type)unregisterCustomRenderer(type: string): void;Unregister the custom renderer.
validateCells(itemIndices, visibleOnly, pageAllItems, columns)validateCells(itemIndices: number | number[] | null, visibleOnly?: boolean, pageAllItems?: boolean, columns?: string | string[]): object;Rather than verifying upon input, verification is performed on the data in the grid in batches.

Construct Desc

(constructor)

Constructs a new instance of the GridBase class


Events Desc

onCellButtonClicked

Called when the user clicks the action button inside a data cell.

Type - (grid: GridBase, index: CellIndex, column: [GridColumn] (/refs/Interface/GridColumn)) => void

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the item containing the data cell

column - Column connected to data cell

Example:

gridView.onCellButtonClicked = function (grid, index, col) {
 console.log(index);
};

onCellClicked

A callback indicating that a grid cell has been clicked

Type - (grid: GridBase, clickData: ClickData) => void

Remarks:

[Parameter list]

grid - GridBase control

clickData - Clicked cell information

Example:

gridView.onCellClicked = function (grid, clickData) {
 console.log(clickData);
}

onCellDblClicked

A callback indicating that a grid cell has been double-clicked.

Type - (grid: GridBase, clickData: ClickData) => void

Remarks:

[Parameter list]

grid - GridBase control

clickData - Clicked cell information

Example:

gridView.onCellDblClicked = function (grid, clickData) {
 console.log(clickData);
}

onCellEdited

A callback notifying that one field value of the edit item being modified or added has been edited.

Type - (grid: GridBase, itemIndex: number, row: number, field: number) => void

Remarks:

[Parameter list]

grid - GridBase control

itemIndex - The order of the row being edited

row - Unique number of the row being edited

field - Index of the field just edited

Example:

gridView.onCellEdited = function (grid, itemIndex, row, field) {
 console.log('Edit done! at ' + itemIndex + ', ' + field);
}

onCellItemClicked

A callback notifying that an element contained in a grid cell has been clicked.

Type - (grid: GridBase, index: CellIndex, clickData: [ClickData] (/refs/Interface/ClickData)) => boolean

Remarks:

If you handle a click within this event, you must return false to not execute the element's default action.

[Parameter list]

grid - GridBase control

index - Location information of the clicked data cell

clickData - Clicked cell information

Example:

gridView.onCellItemClicked = function (grid, index, clickData) {
 console.log(clickData);
 return true;
}

onCellPasting

A callback that determines what to paste into a cell.

Type - (grid: GridBase, index: CellIndex, value: any, editResult: EditResult) => boolean

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the clicked data cell

value - the data value being pasted

[Return value] - If false is returned, the paste will not be performed in that cell.

Example:

gridView.onCellPasting = function (grid, index, value) {
 if (value === 'hello') {
 return false;
 }
};

onColumnCheckedChanged

A callback that notifies the user's click on the column header checkbox.

Type - (grid: GridBase, column: GridColumn, checked: boolean) = > void

Remarks:

[Parameter list]

grid - GridBase control

column - column object

checked - Checked or not

Example:

gridView.onColumnCheckedChanged = function (grid, col, chk) {
 console.log(col.name + "was checked as: " + chk);
};

onColumnPropertyChanged

Warning: This API is now obsolete.

Replaced with callback GridBase.onLayoutPropertyChanged that notifies that the width, displayIndex, and visible property values of the column properties have changed.

Type - (grid: GridBase, column: GridColumn, property: string, newValue : any, oldValue: any) => void

Remarks:

[Parameter list]

grid - GridBase control

column - Information on the changed column

property - Changed displayWidth, displayIndex, or visible properties of the column

value - The changed value is passed.

Example:

gridView.onColumnPropertyChanged = function (grid, column, property, newValue, oldValue) {
 
 console.log(column + "s props werer changed!");
}

onCommandStackChanged

Callback notifying that the CommandStack has changed

Type - (grid: GridBase, undoable: boolean, redoable: boolean) => void

Remarks:

[Parameter list]

grid - GridBase control

undoable - back

redoable - forward

Example:

gridView.onCommandStackChanged = function (grid, undoable, redoable) {
 if (undoable === true) {
 console.log('You can undo now!');
 }
};

onContextMenuItemClicked

A callback notifying the click of a context menu item added via setContextMenu()

Type - (grid: GridBase, item: PopupMenuItem, clickData: [ClickData] (/refs/Interface/ClickData)) => void

Remarks:

[Parameter list]

grid - GridBase control

item - information about the menu item that was clicked

clickData - Information about the clicked item

Example:

gridView.onContextMenuItemClicked = function (grid, item, clickData) {
 console.log(clickData);
};

onContextMenuPopup

A callback that determines the display of the ContextMenu with its coordinates

Type - (grid: GridBase, x: number, y: number, clickData: ClickData, menu: string, rightClick: boolean) => boolean | string

Remarks:

[Parameter list]

grid - GridBase control

x - x-coordinate value at which ContextMenu was called

y - y coordinate value where ContextMenu was called

clickData - Information about the clicked item

menu - menuName

rightClick - Whether to click the right button

[Return value] - If false is returned, the context menu is not displayed. Also, if menuName is returned, the corresponding menu is displayed.

Example:

gridView.onContextMenuPopup = function (grid, x, y, clickData, menu, rightClick) {
 console.log(clickData);
};

onCopy

Callback to decide copy with control + c keys

Type - (grid: GridBase, selection: Selection | Selection[], event: ClipboardEvent) => boolean

Remarks:

[Parameter list]

grid - GridBase control

selection - selection information

event - Event information (ClipboardEvent (opens in a new tab))

[Return value] - If false is returned, copying is canceled.

Example:

gridView.onCopy = function(grid, selection, event) {
 let data = JSON.stringify(grid.getSelectionData());
 if (data) {
  data = 'onCopy\r\n' + data;
  if (window.clipboardData) {
  window.clipboardData.setData("Text", data);
  } else {
  event.clipboardData.setData('text/plain', data);
  }
 }
 return false;
}

onCurrentChanged

A callback that notifies the change in position of the grid's focus cell.

Type - (grid: GridBase, newIndex: CellIndex) => void

Remarks:

Just before change, call onCurrentChanging

[Parameter list]

grid - GridBase control

newIndex - Changed cell location information

Example:

gridView.onCurrentChanged = function (grid, newIndex) {
 console.log(newIndex);
}

onCurrentChanging

A callback that determines the change in position of the grid's focus cell.

Type - (grid: GridBase, oldIndex: CellIndex, newIndex: [CellIndex] (/refs/Interface/CellIndex)) => boolean

Remarks:

After change, call onCurrentChanged.

[Parameter list]

grid - GridBase control

oldIndex - Cell location information before change

newIndex - Cell location information to be changed

[Return value] - If the callback function explicitly returns false, current will not change.

Example:

gridView.onCurrentChanging = function (grid, oldIndex, newIndex) {
 console.log(oldIndex);
 console.log(newIndex);
 // return false; If you do this, the location does not change.
};

onCurrentRowChanged

A callback notifying that the position of a row of data has changed.

Type - (grid: GridBase, oldRow: number, newRow: number) => void

Remarks:

onCurrentChanged occurs when the itemIndex of the selected cell changes. However, in the case of onCurrentRowChanged, it occurs when the index of the data row of the selected cell changes.

[Parameter list]

grid - GridBase control

oldRow - Position of the data row before change

newRow - Position of the data row after change. If -1, it is a new row or dataProvider is empty.

Example:

gridView.onCurrentRowChanged = function (grid, oldRow, newRow) {
 console.log("oldRow => ", oldRow, "newRow => ", newRow);
};

onCut

Callback to determine cut with control + x keys

Type - (grid: GridBase, selection: Selection | Selection[], event: ClipboardEvent) => boolean

Remarks:

[Parameter list]

grid - GridBase control

selection - selection information

event - Event information (ClipboardEvent (opens in a new tab))

[Return value] - If false is returned, the cut is cancelled.


onDataLoadComplated

A callback that fires after the grid refresh is complete after executing dataProvider.setRows().

Type - (grid: GridBase) => void

Remarks:

[Parameter list]

grid - GridBase control

Example:

gridView.onDataLoadComplated = function (grid) {
 console.log("Grid DataLoadComplated")
};

onEditCanceled

A callback notifying that editing is canceled when the user presses the ESCAPE key while editing or when cancel() is called.

Type - (grid: GridBase, index: CellIndex) => void

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the data cell whose editing was canceled

Example:

gridView.onEditCanceled = function (grid, index) {
 console.log("Edit Canceled at " + index.column);
}

onEditChange

A callback notifying that the value of an item has changed due to the user entering a key, etc.

Type - (grid: GridBase, index: CellIndex, value: any) = > void

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the currently focused cell

value - the data value of the cell being edited

Example:

gridView.onEditChange = function (grid, index, value) {
 console.log("grid.onEditChange driven, " + index.column + ' at ' + index.dataRow + ' was replaced by value: ' + value);
}

onEditCommit

A callback that determines whether user input is reflected in the cell.

Type - (grid: GridBase, index: CellIndex, oldValue: any, newValue : any) => boolean

Remarks:

Occurs when you move from the cell being edited to another cell or call commitEditor(). It does not occur when changed to user code such as setValue().

[Parameter list]

grid - GridBase control

index - Location information of the changed cell

oldValue - Data value of the cell before editing

newValue - Data value of the cell after editing

[Return value] - If false is returned, it is not reflected in the cell.

Example:

gridView.onEditCommit = function (grid, index, oldValue, newValue) {
 if (newValue === '') {
 return false;
 }
 console.log(oldValue + 'was changed to ' + newValue);
}

onEditRowChanged

A callback that notifies the row that the value changed by user input has been reflected in the row.

Type - (grid: GridBase, itemIndex: number, row: number, field: number, oldValue: any, newValue: any) => void

Remarks:

If pasteOptions.noEditEvent is true, it does not occur.

[Parameter list]

grid - GridBase control

itemIndex - Order of changed rows

row - Unique number of the changed row

field - Index of the changed field

oldValue - Data value of the cell before editing

newValue - Data value of the cell after editing

Example:

gridView.onEditRowChanged = function (grid, itemIndex, dataRow, field, oldValue, newValue) {
 let v = grid.getValue(itemIndex, field);
 console.log("onEditRowChanged, " + field + ": " + oldValue + " => " + newValue);
};

onEditRowPasted

A callback indicating that something has been pasted into a grid cell.

Type - (grid: GridBase, itemIndex: number, row: number, fields: number[], oldValues: any[], newValues : any[]) => void

Remarks:

When pasting multiple rows, refer to onRowsPasted

[Parameter list]

grid - GridBase control

itemIndex - Order of changed rows

row - Unique number of the changed row

fields - indexes of fields

oldValues - Data values of the cell before editing

newValues - Data values of the cell after editing

Example:

gridView.onEditRowPasted = function (grid, itemIndex, row, fields, oldValues, newValues) {
 console.log('Row pasted!: {' + newValues.join() + '}');
};

onEditSearch

A callback indicating that a search has been performed

Type - (grid: GridBase, index: CellIndex, text: string) = > void

Remarks:

Occurs when the conditions searchLenght and searchDelay are met in SearchCellEditor do. Or, it occurs when you press Ctrl+Enter or Enter key.

[Parameter list]

grid - GridBase control

index - Changed cell location information

text - the value entered into the cell

Example:

gridView.onEditSearch = function (grid, index, text) {
 console.log(text + 'was searched!');
}

onErrorClicked

A callback notifying that an error window in the grid has been clicked.

Type - (grid: GridBase, error: string) => void

Remarks:

[Parameter list]

grid - GridBase control

error - error message

Example:

gridView.onErrorClicked = function (grid, error) {
 console.log(error);
}

onFiltering

Callback to determine filtering

Type - (grid: GridBase, column: DataColumn) => boolean

Remarks:

[Parameter list]

grid - GridBase control column - Dispatched when the filter selector is displayed. It is not transmitted when changing the active status of the filter.

[Return value] - Default value: true, specifies whether to perform filtering. If false is returned, filtering is canceled.

Example:

gridView.onFiltering = function (grid, column) {
 if (column && column.name === "column") {
 return false; // Prevents specific columns from being filtered using the filter selector.
 }
 return true;
}

onFilteringChanged

A callback notifying that filters are set in a column and that the state of the filter has changed.

Type - (grid: GridBase, column: GridColumn, filter: [ColumnFilter] (/refs/Interface/ColumnFilter)) => void

Remarks:

[Parameter list]

grid - GridBase control

column - Filtered column information

filter - information about the filter

reset - whether to click reset

Example:

gridView.onFilteringChanged = function (grid, column, filter) {
 console.log('Filter changed!');
}

onGetEditValue

A callback containing the cell position and editing result when cell editing is completed.

Type - (grid: GridBase, index: CellIndex, editResult: [EditResult] (/refs/Interface/EditResult)) => boolean

Remarks:

In the case of DropDownCellEditor, SearchCellEditor, and MultiCheckCellEditor, the value corresponding to the labels is output to editResult.text, and the value corresponding to the values is output to editResult.value.

In the case of DateCellEditor, a value formatted with the editor's datetimeFormat is output to editResult.text, and a Date object is output to editResult.value.

In the case of other editors, the same values are output for text and value.

If you return boolean, GridBase.onEditCommit will not be called.

It is output in the form of EditResult.

[Parameter list]

grid - GridBase control

index - Location information of the edited cell

editResult - A simple object with the text and value of the edited cell as properties; the output value varies depending on the type of cell editor.

[Return value] - If false is returned, it is not reflected in the cell.

Example:

gridView.onGetEditValue = function (grid, index, editResult) {
 console.log(editResult);
}

onGridActivated

A callback indicating that the grid has been selected

Type - (grid: GridBase) => void

Remarks:

It is best to use the grid by storing it in a global variable.

[Parameter list]

grid - GridBase control

Example:

gridView.onGridActivated = function (grid) {
 alert('Selected!');
}

onHideEditor

A callback to notify you that editing is complete and the editor has disappeared.

Type - (grid: GridBase, index: CellIndex) => void

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the edited cell

Example:

gridView.onHideEditor = function (grid, index) {
 console.log("onHideEditor:" + index.itemIndex + "," + index.column);
}

onItemAllChecked

A callback notifying that the user clicked on the header of the checkBar to select or deselect all, or entered checkAll true / false to select or deselect all.

Type - (grid: GridBase, checked: boolean) => void

Remarks:

[Parameter list]

grid - GridBase control

checked - true if checked, false if unchecked

Example:

gridView.onItemAllChecked = function (grid, checked) {
 console.log('All checked as ' + checked);
};

onItemChecked

A callback notifying that the user changed a check by clicking a checkbox in checkBar or calling checkItem.

Type - (grid: GridBase, itemIndex: number, checked: boolean) => void

Remarks:

[Parameter list]

grid - GridBase control

itemIndex - Order of checked data rows

checked - If checked, true is output, if unchecked, false is output.

Example:

gridView.onItemChecked = function (grid, itemIndex, checked) {
 console.log('Checked as ' + checked + ' at ' + itemIndex);
};

onItemEditCancel

A callback that determines whether the user wants to cancel row editing.

Type - (grid: GridBase, itemIndex: number, state: string) => boolean

Remarks:

[Parameter list]

grid - GridBase control

itemIndex - Order of rows for which editing was canceled

state - The state of the unedited row. updating, inserting, appending are returned.

[Return value] - Default value: true, if false is returned, row edit cancellation is canceled. (Continued editing)

Example:

gridView.onItemEditCancel = function (grid, itemIndex, state) {
 console.log(state);
 if (itemIndex % 5 === 0) {
 return false;
 }
}

onItemEditCanceled

A callback indicating that the user canceled row editing.

[Parameter list]

grid - GridBase control

itemIndex - Order of rows for which editing was canceled

state - the state of the unedited row

Type - (grid: GridBase, itemIndex: number, state: string) => void

Example:

gridView.onItemEditCanceled = function (grid, itemIndex, state) {
 console.log(state);
}

onItemsChecked

A callback notifying that the user changed a check by clicking a checkbox in checkBar or calling checkItem.

Type - (grid: GridBase, items: number[], checked: boolean) => void

Remarks:

[Parameter list]

grid - GridBase control

items - Order of checked data rows

checked - true: checked, false: unchecked

Example:

gridView.onItemsChecked = function (grid, items, checked){
 console.log(items.join() + ' are checked as ' + checked);
}

onKeyDown

A callback that determines keystrokes

Type - (grid: GridBase, event: KeyboardEvent) => boolean

Remarks:

Occurs when KeyDown occurs. This occurs continuously while a key is being input.

[Parameter list]

grid - GridBase control

event - KeyboardEvent

[Return value] - Returns false when key input is prohibited/

Example:

gridView.onKeyDown = function (grid, event) {
 console.log('You pressed... ' + event);
}

onKeyPress

A callback to indicate that a key is being entered

Type - (grid: GridBase, event: KeyboardEvent) => void

Remarks:

Occurs when KeyPress is performed. This occurs continuously while a key is being input.

[Parameter list]

grid - GridBase control

event - KeyboardEvent

Example:

gridView.onKeypress = function (grid, event) {
 console.log('You are pressing... ' + event);
}

onKeyUp

A callback notifying that a key has been entered.

Type - (grid: GridBase, event: KeyboardEvent) => void

Remarks:

Occurs when KeyUp occurs.

[Parameter list]

grid - GridBase control

event - KeyboardEvent

Example:

gridView.onKeyUp = function (grid, event) {
 console.log('You pressed... ' + event);
}

onLayoutCollapsed

Callback notifying that the group layout has been collapsed

Type - (grid: GridBase, layout: CellLayoutGroupItem) => void

Remarks:

[Parameter list] grid - GridBase control

layout - Collapsed group layout

Example:

gridView.onLayoutCollapsed = function(grid, layout) {
 console.log("Layout Collapsed => " + layout.name)
}

onLayoutCollapse

Callback to determine group layout collapse

Type - (grid: GridBase, layout: CellLayoutGroupItem) => boolean

Remarks:

If you return false, folding is canceled. [Parameter list]

grid - GridBase control

layout - collapsing group layout

Example:

gridView.onLayoutCollapsing = function(grid, layout) {
 if (layout.name === "group0") {
 return false;
 }
}

onLayoutExpanded

Callback notifying that the group layout has been expanded

Type - (grid: GridBase, layout: CellLayoutGroupItem) => void

Remarks:

[Parameter list] grid - GridBase control

layout - group layout to expand

Example:

gridView.onLayoutExpanded = function(grid, layout) {
 console.log("Layout Expanded => " + layout.name)
}

onLayoutExpanding

Callback that determines group layout expansion

Type - (grid: GridBase, layout: CellLayoutGroupItem) => boolean

Remarks:

If you return false, expansion is canceled. [Parameter list]

grid - GridBase control

layout - group layout to expand

Example:

gridView.onLayoutExpanding = function(grid, layout) {
 if (layout.name === "group0") {
 return false;
 }
}

onLayoutPropertyChanged

A callback notifying that the displayWidth, displayIndex, and visible property values among the layout properties have changed.

Type - (grid: GridBase, layout: CellLayoutItem, property: string, newValue : any, oldValue: any) => void

Remarks:

[Parameter list]

grid - GridBase control

layout - Information on changed layout

property - Changed displayWidth, displayIndex, or visible properties of the column

newValue - The value is passed after change.

oldValue - The value before change is transmitted.

Example:

gridView.onLayoutPropertyChanged = function (grid, layout, property, newValue, oldValue) {
 
 console.log(layout + "s props werer changed!");
}

onLeftPosChanged

A callback notifying that the position of the horizontal scroll bar has changed.

Type - (grid: GridBase, pos: number) => void

Remarks:

[Parameter list]

grid - GridBase control

pos - Left position of grid when scrolling

Example:

gridView.onLeftPosChanged = function (grid, pos) {
 console.log(pos + " was changed!");
}

onMenuItemClicked

Callback notifying that the added pop-up menu item is clicked

Type - (grid: GridBase, item: PopupMenuItem, clickData: [ClickData] (/refs/Interface/ClickData)) => void

Remarks:

If callback is specified in MenuItem, it is not called.

[Parameter list]

grid - GridBase control

item - MenuItem object

clickData - Information about the clicked item

Example:

gridView.onMenuItemClicked = function (grid, item, clickData) {
 console.log(item.label + "was clicked.");
};

onPaste

A callback that determines what to paste into the grid.

Type - (grid: GridBase, index: CellIndex, event: ClipboardEvent) = > boolean

Remarks:

[Parameter list]

grid - GridBase control

index - Cell location information

event - Event information (ClipboardEvent (opens in a new tab))

[Return value] - If false is returned, the paste is canceled.

Example:

gridView.onPaste = function (grid, index, event){
 console.log("Pasting Starts!");
}

onPasted

A callback indicating that something has been pasted into the grid.

Type - (grid: GridBase) => void

Remarks:

This does not occur when the input editor is displayed.

[Parameter list]

grid - GridBase control

Example:

gridView.onPasted = function (grid){
 console.log("Pasted!");
}

onRowInserting

A callback that determines whether the user inserts a new row by pressing the Insert key or adds a row by pressing the down arrow on the last row.

Type - (grid: GridBase, itemIndex: number, dataRow: number) => boolean

Remarks:

[Parameter list]

grid - GridBase control

itemIndex - Order of row insertion position

dataRow - Unique id of the row insertion location.

[Return value] - Message to be displayed to the user when adding rows is prohibited.

Example:

gridView.onRowInserting = function (grid, itemIndex, dataRow) {
 console.log('Inserted: ' + dataRow + ' at ' + itemIndex);
}

onRowsDeleting

When the user presses Ctrl+Del or deletes with deleteSelection(), a callback that determines the actual deletion.

[Parameter list]

grid - GridBase control

rows - an array of data row sequences of the rows to be deleted

[Return value] - If a non-null value is returned, the specified text is displayed and deletion is canceled.

Type - (grid: GridBase, rows: number[]) => boolean

Example:

gridView.onRowsDeleting = function (grid, rows) {
 console.log('Deleted: ' + rows.join());
}

onRowsPasted

Callback to indicate that multiple rows have been pasted

Type - (grid: GridBase, items: number[]) => void

Remarks:

[Parameter list]

grid - GridBase control

items - the order in the grid of the pasted rows

Example:

gridView.onRowsPasted = function (grid, items) {
 console.log('Rows pasted!: ' + items.join());
};

onScrollToBottom

A callback that is called when the last row is displayed in the grid by the user operating the keyboard, scroll bar, etc.

Type - (grid: GridBase) => void

Remarks:

[Parameter list]

grid - GridBase control

Example:

gridView.onScrollToBottom = function (grid) {
 var data = {"SearchKey":"searchData"},
 $.ajax({
 url:"/loadData.do",
 data: data,
 type:"post",
 async:false;
 success: function (data, textStatus) {
 grid.fillJsonData(data.dataList, {fillMode:"append"});
 }
 })
});

onSearchCellButtonClick

A callback notifying that a button was clicked in SearchCellEditor

Type - (grid: GridBase, index: CellIndex, text: string) = > void

Remarks:

[Parameter list]

grid - GridBase control

index - Clicked cell location information

text - the value entered into the cell

Example:

gridView.onSearchCellButtonClick = function (grid, index, text) {
 console.log(text + 'button was clicked!');
}

onSelectionAdded

Warning: This API is now obsolete.

Scheduled to be removed after version 2.6.0

Callback notifying that a new selection area has been added

Type - (grid: GridBase, selection: Selection) => void

Remarks:

Information on the selection area being changed can be found with the getSelectionData function. Does not occur when GridBase.getSelection().style is SelectionStyle.NONE.

[Parameter list]

grid - GridBase control

selection - selection information

Example:

gridView.onSelectionAdded = function (grid, selection) {
 console.log(selection);
}

onSelectionChanged

A callback notifying that the user has changed the size of the selection using the mouse or keyboard.

Type - (grid: GridBase, selection: Selection) => void

Remarks:

Information on the selection area being changed can be found with the getSelectionData function. Does not occur when GridBase.displayOptions.selectionStyle is SelectionStyle.NONE.

[Parameter list]

grid - GridBase control selection - Selection information

Example:

gridView.onSelectionChanged = function (grid) {
 console.log('Selection changed!');
}

onSelectionCleared

A callback notifying that the existing selection area has been removed when the user changes the selection area with the mouse or keyboard.

Type - (grid: GridBase) => void

Remarks:

This does not occur if there is no existing selection area.

[Parameter list]

grid - GridBase control

Example:

gridView.onSelectionCleared = function (grid) {
 console.log('Selection cleared');
}

onSelectionEnded

Warning: This API is now obsolete.

Scheduled to be removed after version 2.6.0

A callback to notify the user of completion of changes to the selection with the mouse.

Type - (grid: GridBase, selection: Selection) => void

Remarks:

Information on the changed selection area can be found with the getSelection function, and data on the selection area can be known with the getSelectionData function. [Parameter list]

grid - GridBase control selection - Selection information

Example:

gridView.onSelectionEnded = function (grid) {
 let cells = grid.getSelectionData();
 console.log(cells);
}

onShowEditCommand

A callback that determines whether to display the editCommand displayed on mobile.

Type - (grid: GridBase, index: CellIndex) => boolean

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the cell where the editor is to be opened.

[Return value] - If false is returned, the EditCommand is not displayed.


onShowEditor

A callback that determines the display of the editor opened for each cell.

Type - (grid: GridBase, index: CellIndex, props: any, attrs : any) => boolean

Remarks:

[Parameter list]

grid - GridBase control

index - Location information of the cell where the editor is to be opened.

props - Cell Editor configuration information

attrs - Internal editor element attributes. Values that the user can arbitrarily specify.

[Return value] - If false is returned, the Editor is not displayed.

Example:

gridView.onShowEditor = function (grid, index, props, attrs) {
 console.log("onShowEditor:" + index.itemIndex + "," + index.column);
 if (index.column == "OrderID") {
  props.textCase = 'upper';
 }
}

onShowHeaderTooltip

A callback indicating that the tooltip for the column header has been displayed.

Type - (grid: GridBase, column: GridColumn, value: any, layout : CellLayoutItem) => string

Remarks:

[Parameter list]

grid - GridBase control

column - If the column on which the tooltip will be displayed is a GroupHeader, it is the first column of the group.

value - The value to be displayed in the tooltip. By default, column header text is transmitted.

layout - Layout of the column where the tooltip will be displayed.

[Return value] - The value to display in the tooltip. If nothing is returned, the Tooltip is not displayed.

Example:

gridView.onShowHeaderTooltip = function (grid, column, value, layout) {
 return 'header-tooltip: ' + value;
}

onShowTooltip

A callback to indicate that a data cell's tooltip has been displayed.

Type - (grid: GridBase, index: CellIndex, value: any) = > boolean | string

Remarks:

[Parameter list]

grid - GridBase control.

index - Cell location information in the area where the mouse pointer is located

value - the data where the mouse pointer is located

[Return value] - The value to display in the tooltip. If nothing is returned, the Tooltip is not displayed.

Example:

gridView.onShowTooltip = function (grid, index, value) {
 if (index % 7 === 0) {
 return '7-multiple Row!'
 }
}

onSorting

Callback to determine sorting

Type - (grid: GridBase, fields: number[], directions: string[]) => boolean

Remarks:

[Parameter list]

grid - GridBase control

fields - list of fields to sort by

direction - List of sorting methods for each field

[Return value] - If false is returned, sorting is canceled.

Example:

gridView.onSorting = function (grid) {
 if (fields. length > 5) {
 return false;
 }
}

onSortingChanged

A callback indicating that sorting has occurred.

Type - (grid: GridBase) => void

Remarks:

[Parameter list]

grid - GridBase control

Example:

gridView.onSortingChanged = function (grid) {
 console.log('Sorted! ');
}

onTopIndexChanged

A callback notifying that the position of the vertical scroll bar has changed.

Type - (grid: GridBase, itemIndex: number) => void

Remarks:

[Parameter list]

grid - GridBase control

itemIndex - The itemIndex value displayed at the top of the grid when scrolling.

Example:

gridView.onTopIndexChanged = function (grid, idx) {
 console.log(idx + "was changed!");
}

onTopIndexChanging

Callback called when gridView.topIndex changes

Type - (grid: GridBase, currentTop: number, delta: number, focusing: boolean, adjust: boolean) => number

Remarks:

Used to move by the value specified by the user when scrolling. You should not return more than the value shown on the page.

[Parameter list]

grid - GridBase control

currentTop - topIndex before change

delta - change value

focusing - true if topIndex changes due to focus change

adjust - true to adjust position within the grid

[Return value] - If number is returned, topIndex is moved by the corresponding value.

Example:

var userSetTopItem = false;
grid.onTopIndexChanging = function(_grid, current, delta, focusing, adjust) {
// When using mergeCell like a block, scrolling is also used to move in block units.
// In the case of setTopItem, since it cannot be distinguished in the event, a value that can be distinguished externally must be given.
// In case of rowGrouping, the code below cannot be used as is.
 
 var fcnt = _grid.fixedOptions.rowCount;
 // When moving to the first or last row, or when correcting the position within the grid, if 'null' is returned, it moves by the delta value to which it was originally intended to be moved.
 if (current + delta + _grid.fullItemCount() + fcnt >= _grid.getItemCount() || current + delta === 0 || (adjust && !focusing)) {
 console.log(current, delta, `scroll bottom or Top or adjust = ${adjust}`);
 return;
 }
 
 var top = current + delta; // topIndex where you want the grid to move
 var items = _grid.getMergedItems(top + fcnt, "merge column", true, true); // Items of block to move
 var curItems = _grid.getMergedItems(current + fcnt, "merge column", true, true); // Items of current top block
 
 if (delta < 0 || top === items[0] + fcnt || userSetTopItem) { // When scrolling up or moving to the top with fixedRow or when the user setsTopItem
 top = items[0]; // The first row of the block is topIndex
 } else { // When scrolling down
 top = items[0] === curItems[0] ? items[items.length - 1] + 1 : top = items[0]
 }
 
 return top - current - fcnt;
}
 
function setTop(index) {
 userSetTopItem = true;
 grid.setTopItem(index);
 userSetTopItem = false;
}

onValidateColumn

A callback that determines the result of user verification through Javascript when completing cell editing and moving to another cell.

Type - (grid: GridBase, column: DataColumn, inserting: boolean, value : any, itemIndex: number, dataRow: number) => ValidationError | undefined

Remarks:

If there is a problem with the corresponding column value, the verification error and error message are sent to the grid as a return value.

If an object containing level and message values is passed to the grid, verification is judged to have failed.

It must be returned in the form ValidationError.

[Parameter list]

grid - GridBase control

column - column object

inserting - true: adding column, false: modifying column

value - the value of the entered field

itemIndex - Order of cell-edited rows

dataRow - Unique number of the cell-edited row.

[Return Value] - ValidationError

Example:

gridView.onValidateColumn = function (grid, column, inserting, value, itemIndex, dataRow) {
 if (column.name != "Knock Knock") {
 return {
 level: 'warning';
 messsage: "It's a dad joke! Do not " + JSON.stringify(column);
 }
 }
};

onValidateRow

Callback to determine row-wise user verification results via Javascript

Type - (grid: GridBase, itemIndex: number, dataRow: number, inserting: boolean, values: any[]) => ValidationError

Remarks:

If there is a problem with the values in the row, the verification error and error message are sent to the grid as a return value.

levelIf an object containing and message values is passed to the grid, verification is judged to have failed.

It must be returned in the form ValidationError.

[Parameter list]

grid - GridBase control

itemIndex - Order of rows to verify

dataRow - Unique number of the row being verified

inserting - true: adding column, false: modifying column

values - Values of the entered fields

[Return Value] - ValidationError

Example:

gridView.onValidateRow = function (grid, itemIndex, dataRow, inserting, values) {
 if (dataRow % 2 === 0) {
 return {
 level: 'info';
 messsage: "even!";
 }
 }
};

onValidationFail

Callback that occurs when validation fails

Type - (grid: GridBase, itemIndex: number, column: GridColumn, error : ValidationError) => ValidationError

Remarks:

Separate error handling is possible in the callback function, and when an err object is returned, its own validation message is displayed and is not displayed in other cases.

If an object containing level and message values is passed to the grid, verification is judged to have failed.

It must be returned in the form ValidationError.

[Parameter list]

grid - GridBase control

itemIndex - Index of the row being verified

column - column object

error - verification result

[Return Value] - ValidationError

Example:

gridView.onValidationFail = function (grid, itemIndex, column, err) {
 console.log("onValidationFail:" + itemIndex + "," + JSON.stringify(column) + "," + JSON.stringify(err));
 if (column.name != "Mortal") {
 var editValue = grid.getEditValue();
 err.message = "The entered "+editValue+" is an invalid value";
 return err;
 }
}

onWheel

Callback notifying that a Wheel Event has occurred

Type - (grid: GridBase, event: WheelEvent) => boolean

Remarks:

Occurs when you turn the Mouse Wheel.

[Parameter list]

grid - GridBase control

event - WheelEvent

[Return value] - Return false to ignore the Wheel Event/

Example:

gridView.onWheel = function (grid, event) {
 console.log('You wheeled... ' + event);
}

Properties Desc

checkBar

Configuration model for grid checkbars

Type - CheckBar

Remarks:

Returns a CheckBar object. You can get or set CheckBar properties.

Example:

gridView.checkBar.visibleOnly = true;

copyOptions

Configuration model for copying to clipboard

Type - CopyOptions

Remarks:

CopyOptions Returns an object. You can get or set the properties of CopyOptions.

Example:

gridView.copyOptions.singleMode = true;

dataDropOptions

Configuration model related to data drag and drop

Type - DataDropOptions

Remarks:

Returns dataDropOptions. You can get or set the properties of DataDropOptions.

Example:

gridView.dataDropOptions.dropMode = 'copy';

disabled

The grid does not respond to mouse/keyboard events.

Type - boolean

Remarks:

It can be changed by assigning a value.

Example:

gridView.disabled = true;

displayOptions

Setting model for display information managed at grid level

Type - DisplayOptions

Remarks:

DisplayOptions Returns an object. You can get or set the properties of DisplayOptions.

Example:

gridView.displayOptions.columnResizable = true;

editOptions

Settings model for data editing

Type - EditOptions

Remarks:

EditOptions Returns an object. You can get or set the properties of EditOptions.

Example:

gridView.editOptions.deletable = true;

editorOptions

Settings model for editors

Type - EditorOptions

Remarks:

EditorOptions Returns an object. You can get or set the properties of EditorOptions.

Example:

gridView.editorOptions.yearDisplayFormat = "Year {Y}";

filteringOptions

Settings model for data filtering

Type - FilteringOptions

Remarks:

FilteringOptions Returns an object. You can get or set the properties of FilteringOptions.

Example:

gridView.filteringOptions.enabled = false;

filterPanel

Type - FilterPanel


fixedOptions

Setting model for fixed rows and columns in grid

Type - FixedOptions

Remarks:

FixedOptions Returns an object. You can get or set properties of FixedOptions.

Example:

gridView.fixedOptions.colCount = 2;

footer

Configuration model for the first footer

Type - GridFooter

Remarks:

Returns a GridFooter object. You can get or set the properties of GridFooter.

Example:

gridView.footer.styleName = 'custom-footer-1';

footers

Configuration model for footers

Type - GridFooterCollection

Remarks:

Returns a collection object of GridFooter. [GridFooterCollection](/refs/You can get or set the properties of Interface/GridFooterCollection).

Example:

gridView.footers.visible = false;

formatOptions

Setting model for conversion format of data field values

Type - FormatOptions

Remarks:

FormatOptions Returns an object. You can get or set the properties of FormatOptions.

Example:

gridView.formatOptions.datetimeFormat = 'yyyy-mm-dd';

header

Configuration model for the header area of the grid

Type - GridHeader

Remarks:

Returns a GridHeader object. You can get or set the properties of GridHeader.

Example:

gridView.header.showTooltip = true;

headerSummaries

Collection setting model for Header Summary displayed in grid header area

Type - HeaderSummaryCollection

Remarks:

Returns a collection object of HeaderSummary. Retrieves the property of HeaderSummaryCollection.

Example:

gridView.headerSummaries.visible = false;

headerSummary

Setting model for the first Header Summary displayed in the grid header area

Type - HeaderSummary

Remarks:

HeaderSummary Returns an object. You can get or set the properties of HeaderSummary.

Example:

gridView.headerSummary.visible = false;

hideDeletedRows

Whether or not deleted rows set in the grid are hidden

Type - boolean

Remarks:

It can be changed by assigning a value.

Example:

gridView.hideDeletedRows = true;

mobileOptions

Mobile-specific configuration model

Type - MobileOptions

Remarks:

Returns mobileOptions. You can get or set the properties of MobileOptions.

Example:

gridView.mobileOptions.longTapDuration = false;

onGridFocusChanged

A callback that notifies the grid that it has or loses focus

[Parameter List] grid - GridBase control focused - Whether it is focused event - an event object

Type - (grid: GridBase, focused: boolean, event: Event) => void


pasteOptions

Configuration model for pasting data from the clipboard

Type - PasteOptions

Remarks:

PasteOptions Returns an object. You can get or set the properties of PasteOptions.

Example:

gridView.pasteOptions.enabled = false;

redoing

Is it possible to rerun in the current state?

Type - boolean

Example:

gridView.redoing = false

rowIndicator

Configuration model for grid indicators

Type - RowIndicator

Remarks:

Returns a RowIndicator object. You can get or set the RowIndicator property.

Example:

gridView.rowIndicator.displayValue = 'row';

scrollBarHeight

Change the height of the scrollbar

Type - number

Example:

gridView.scrollBarHeight = 24;

scrollBarWidth

Change the width of the scrollbar

Type - number

Example:

gridView.scrollBarWidth = 24;

sortingOptions

Setting model for data sorting

Type - SortingOptions

Remarks:

SortingOptions Returns an object. You can get or set the properties of SortingOptions.

Example:

gridView.sortingOptions.style = 'reverse';

sortMode

Sort operation mode after data modification

Type - SortMode

Remarks:

Returns SortMode set in the grid. It can be changed by assigning a value.

Example:

gridView.sortMode = "explicit";

stateBar

Configuration model for grid status bar

Type - StateBar

Remarks:

Returns a StateBar object. You can get or set the StateBar property.

Example:

gridView.stateBar.mark = 'image';

summaryMode

How to calculate the sum of the current grid

Type - SummaryMode

Remarks:

Returns SummaryMode set in the grid. It can be changed by assigning a value.

Example:

gridView.summaryMode = "aggregate";

undoable

Is the undo feature available?

Type - boolean

Remarks:

It can be changed by assigning a value.

Example:

gridView.undoable = false

undoing

Is it possible to undo in the current state?

Type - boolean

Example:

gridView.undoing = false

Method Desc

activateAllColumnFilters

Apply or cancel all filters registered in the column.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

active - boolean

true: Enabled, false: Disabled.

[Return Value] - void

Example:

gridView.activateAllColumnFilters('By administrative district', true);

activateColumnFilters

Among the filters registered in the column, apply or disable filters with filter names included in filterNames.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

filterNames - string | string[]

Name of filter to apply or disable or array of names of filters

active - boolean

true: Enabled, false: Disabled.

[Return Value] - void

Example:

gridView.activateColumnFilters('By administrative district', ['Previous'], true);

addColumn

Set additional columns in addition to the set columns.

[Parameter List]

column - ConfigObject | string

Column to add (object such as GridColumn)

index - number

The order in which the relevant columns will be located (including hidden columns). If no value is specified, it is added at the end of the column.

[Return Value] - GridColumn

Example:

let col = {
 "name": "EmployeeID",
 "fieldName": "EmployeeID",
 "type": "data",
 "width": "90",
 "header": {
 "text": "Employee ID"
 }
}
 
gridView.addColumn(col);

addColumnFilters

Register one or more filters in a column. Not applied if column.autoFilter is true.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

filters - ColumnFilter[]

Array of filter objects to register, array of ColumnFilter

overwrite - boolean

Default value: false, when overwrite is false, an error occurs if there is a filter with a duplicate name.

[Return Value] - void

Example:

gridView.addColumnFilters('By administrative district', [{
 name: "Jeon",
 criteria: "value = 'Jeon'"
 }, {
 name: "Answer",
 criteria: "value = 'answer'"
 }])

addLayout

Add a column or group to the layout.

[Parameter List]

source - LayoutItem | string

Column name or layout information to add

index - number

Position to be inserted

[Return Value] - LayoutItem

Remarks:

It cannot be used if layout is not set. It must be used after changing to the layout state using gridView.setColumnLayout.

Example:

gridView.setColumnLayout([]); // Add an empty layout.
 
const column1 = gridView.addColumn({fieldName: "field1", name: "col1"});
const column2 = gridView.addColumn({fieldName: "field2", name: "col2"});
const column3 = gridView.addColumn({fieldName: "field2", name: "col3"});
gridView.addLayout(column1); // gridView.addLayout("col1")
gridView.addLayout({name: "group0", items: [column2, column3]});

addLookupSource

Add and register LookupSource to be used in the lookup tree.

[Parameter List]

source - LookupSource

LookupSource object

[Return Value] - void

Remarks:

If you want to add to the existing ID, use fillLookupData().

Example:

let area3codes = {
 id:"area2code",
 levels:3,
 keys: [['11', '11010', '1101053'], ['11', '11010', '1101054']],
 values: ['Sajik-dong', 'Samcheong-dong']
};
gridView.addLookupSource(area3codes);

addPopupMenu

Add a Popup Menu to the grid.

[Parameter List]

name - string

menu name

menuItems - (PopupMenu | PopupMenuItem)[]

Array following the PopupMenuItem format, menu information in a hierarchical structure

[Return Value] - void

Remarks:

The added menu can be connected to data cells, etc.

Example:

let menu = [{
 label: "menu1.",
 children: [{
 label: "This is submenu1."
 }, {
 label: "This is submenu2."
 }]
 }, {
 label: "This is menu2",
 }, {
 label: "-"
 }, {
 label: "This is menu3",
 type: "check",
 checked: true,
 tag: "check_menu"
 }];
 
gridView.addPopupMenu('menu1', menu);

addSelection

Add an area to select in the grid.

[Parameter List]

item - Selection

Selection Setting information such as model. You only need to pass the properties of the area you want to select.

eventFire - boolean

[Return Value] - void

Remarks:

It is added only when selectionMode is extended.

Example:

let sel = {
 style: "block",
 startItem: 2;
 startColumn: "Nominate",
 endItem: 3;
 endColumn: "Unit"
}
gridView.addSelection(sel);

addUserCellStyle

Specifies the style of the cell.

[Parameter List]

dataRow - number

unique number of the row

column - string | -One

name of column

style - string | ColumnStyleObject

string or ColumnStyleObject

[Return Value] - void

Remarks:

Used to apply a style when it is not possible to create rules to specify the style of a cell. If you enter -1 in column, it will be applied to the entire row.


applyCheckables

Apply checkable to CheckBar based on Expression.

Example:

gridView.applyCheckables();

autoFiltersRefresh

If column.autoFilter is true, the filter list is updated.

[Parameter List]

columns - string[] | DataColumn[]

Array of column names or column objects. Entire column if not entered.

applyFilters - boolean

Whether to apply the active filter.

[Return Value] - void

Remarks:

Called when updating the list of autoFilter. Or, it is automatically updated when the user clicks the filter icon.


beginUpdate

Whenever properties related to the grid are changed, an update lock is applied to delay the internal change processing call.

Remarks:

Use with endUpdate().

Example:

gridview.beginUpdate();
try {
 gridview.displayOptions( { ... });
 gridview.selectOptions( { ... });
...
} finally {
 gridview.endUpdate();
}

cancel

Cancels editing of the row currently being edited.

Remarks:

If it's not editing, it doesn't do anything. When completing editing, you must call commit().

Example:

gridView.cancel();

cancelEditor

Cancel editing and close the editor window.

Example:

gridView.cancelEditor();

checkAll

Check and uncheck all data rows in the grid.

[Parameter List]

checked - boolean

Default: true, true: checked, false: unchecked

visibleOnly - boolean

Whether or not to include rows that are folded and invisible due to collapse

checkableOnly - boolean

Whether to check only checkable rows

checkEvent - boolean

Default: true, whether onItemChecked() occurs.

[Return Value] - void

Remarks:

It is not affected by exclusive of CheckBar.

Example:

gridView.checkAll();

checkItem

Check or uncheck the specified item.

[Parameter List]

itemIndex - number

index of the item

checked - boolean

Default: true, true: checked, false: unchecked

exclusive - boolean

Default: false, true: If there are other checked items, uncheck them all and check only the item entered by the item index.

checkEvent - boolean

Default: true, whether onItemChecked() occurs.

[Return Value] - void

Example:

gridView.checkItem(4);

checkItems

Check or uncheck the items corresponding to the entered item array.

[Parameter List]

itemIndices - number[]

item index array

checked - boolean

Default: true, true: checked, false: unchecked

checkEvent - boolean

Default: true, whether onItemChecked() occurs.

[Return Value] - void

Example:

gridView.checkItems([1,2,3,4]);

checkModel

Checks or unchecks the specified GridItem.

[Parameter List]

model - GridItem

GridItem

checked - boolean

Default: true, true: Check, false: Uncheck

exclusive - boolean

Default: false, true: Uncheck all other checked items and check only the item entered as row

checkEvent - boolean

Default: true, Whether onItemChecked() occurs

[Return Value] - void

Remarks:

Used when changing the check of the header of a hidden group.


checkRow

Checks or unchecks the specified data row.

[Parameter List]

row - number

unique row number

checked - boolean

Default: true, true: checked, false: unchecked

exclusive - boolean

Default: false, true: If there are other checked items, uncheck them all and check only the items entered as a row.

checkEvent - boolean

Default: true, whether onItemChecked() occurs.

[Return Value] - void

Example:

gridView.checkRow(4);

checkRows

Check or uncheck items connected to the unique row numbers entered.

[Parameter List]

rows - number[]

array of unique row numbers

checked - boolean

Default: true, true: checked, false: unchecked

checkEvent - boolean

Default: true, whether onItemChecked() occurs.

[Return Value] - void

Example:

gridView.checkRows([1,2,3,4]);

clearColumnFilters

Removes filters registered in a column. Not applied if column.autoFilter is true.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

[Return Value] - void

Example:

gridView.clearColumnFilters();

clearCommandStack

Initialize the Command Stack.

[Parameter List]

all - boolean

?

[Return Value] - void

Example:

gridView.clearCommandStack();

clearCurrent

Remove focus.

Example:

gridView.clearCurrent();

clearInvalidCells

Delete cell information that failed value verification.

Remarks:

This function is used to clear the list of data that failed verification when executing validateCells().

Example:

gridView.validateCells();
gridView.clearInvalidCells();
let invalids = gridView.getInvalidCells(); //null

clearLookupData

Clears the lookup source corresponding to the specified SourceId.

[Parameter List]

sourceId - string

LookupSource id

[Return Value] - void

Example:

gridView.clearLookupData('area1code');

clearRowHeights

Returns the height of individual rows where changes have been applied to the initial value.

[Parameter List]

all - boolean

true: All, false: Only those changed with setRowHeight() are excluded.

[Return Value] - void

Example:

gridView.clearRowHeights(true);

clearSelection

Removes all selected areas.

Example:

gridView.clearSelection();

closeList

Close the filter box or DropDown Editor.

Example:

gridView.closeList();

closeLoading

Hide loading animation.

Example:

gridView.closeLoading();

closeProgress

Close the progress bar.

Example:

gridView.closeProgress();

columnByField

Returns information on the first column connected to the data field specified by the field name.

[Parameter List]

fieldName - string

field name

[Return Value] - DataColumn

Example:

let col = gridView.columnByField('fieldName');

columnByName

Returns column setting information using the column name.

[Parameter List]

name - string

column name

[Return Value] - DataColumn

Example:

let col = gridView.columnByName('colName');

columnByTag

Retrieves a column with the entered tag value.

[Parameter List]

tag - any

Tag specified in column

[Return Value] - GridColumn

Remarks:

If there is more than one column with the same tag, the first column among them is returned. If the corresponding column does not exist, null is returned.

Example:

let col = gridView.columnByTag('tag');

columnsByTag

Columns with input tag values are brought into an array.

[Parameter List]

tag - any

Tag specified in column

[Return Value] - GridColumn[]

Example:

let cols = gridView.columnsByTag('tag');

commit

Complete editing of the row being edited and save it to DataProvider.

[Parameter List]

force - boolean

Default: false, true: Commit the row whose editing was canceled during input/editing (no RowState change, marked as edited by Indicator).

[return value] - boolean

Example:

gridView.commit();

commitEditor

Reflects the contents of the current editor to the cell.

[Parameter List]

hideEditor - boolean

Default: true, whether to exit the Editor or not.

force - boolean

Default: true, When set to true, onEditCommit is not called.

[Return Value] - boolean

Remarks:

After running onEditCommit, onEditRowChanged, [onCellEditted](/refs/Class /GridBase#oncelledited) Events occur sequentially.

Example:

gridView.commitEditor();

copyToClipboard

Copies or returns information on cells included in the selected area.

[Parameter List]

selection - Selection

If the information in the selection area is not specified, the entire grid is copied.

copy - boolean

Default: true, true: copy to clipboard, false: return

[return value] - string

Remarks:

It cannot be used if there are multiple selected areas.

Example:

let sel = gridView.getSelection();
let copied = gridView.copyToClipboard(sel);

deleteSelection

Deletes rows in the current selection area.

[Parameter List]

force - boolean

If true, it is deleted immediately without displaying a dialog box. It is deleted even if editOptions.deletable is false.

[Return Value] - void

Remarks:

Does not work if EditOptions.deletable is false.

Example:

gridView.deleteSelection(true);

destroy

Turn off the grid.

Example:

gridView.destroy();

endUpdate

Release the update lock and redraw the grid.

[Parameter List]

force - boolean

The grid is redrawn regardless of whether beginUpdate() is called.

[Return Value] - void

Remarks:

Use with beginUpdate().

Example:

See beginUpdate()


eraseSelection

Deletes the values of cells in the selection area. In other words, change the value to undefined.

[Parameter List]

force - boolean

If true, the cell value is erased even if editOptions.erasable is false

[Return Value] - void

Remarks:

Does not work if EditOptions.erasable is false.

Example:

gridView.eraseSelection();

existsCustomRenderer

Check if there is a user renderer.

[Parameter List]

type - string

Registered renderer name

[return value] - boolean


existsLookupData

Returns whether the specified key exists in the specified lookupsource.

[Parameter List]

sourceId - string

Id of LookupSource.

keys - string | string[]

Key value, values to find.

[return value] - boolean

Example:

gridView.existsLookupData('area1code', ['12']);

exportGrid

The shape and data of the current grid are exported to an external document according to the specified settings.

[Parameter List]

options - GridExportOptions

A configuration model like GridExportOptions .

[Return Value] - void

Example:

gridView.exportGrid({
 type: 'csv'
})

fillEditSearchItems

Items related to the input value are searched and displayed in the list. Used for partial search purposes.

[Parameter List]

column - string | GridColumn

Column object or column name where the list will be displayed

searchKey - string

Search key value

values - string[]

Retrieved value values

labels - string[]

Retrieved label values

items - ListResult

Array of additional information to be passed to templateCallback

[Return Value] - void

Example:

let CustomerNames = ["ALFKI", "ANATR", "ANTON", "AROUT", "BERGS", "BLAUS"];
dataProvider.setFields([
 {fieldName:"code"},
 {fieldName:"codeName"} // Field containing the code name
]);
gridView.setColumns([{
 fieldName:"code",
 name:"code",
 editor:{type:"search",searchLength:1, searchDelay:500, useCtrlEnterKey:true, useEnterKey:true },
 lookupDisplay:true;
 labelField:"codeName"
}]);
 
// Event that occurs after the last key is entered and searchDelay has passed
gridView.onEditSearch = function (grid, index, text) {
 console.log("onEditSearch:" + index.itemIndex + "," + index.column + ", " + text);
 let values = CustomerNames.filter(function (str) {
 return str.indexOf(text) == 0;
 });
 let labels = CustomerNames.filter(function (str) {
 return str.indexOf(text) == 0;
 });
 console.log(values);
 gridView.fillEditSearchItems(index.column, text, values, labels);
};
 
// Event that occurs when selection is made in searchEditor
gridView.onGetEditValue = function (grid, index, editResult) {
 if (index.column === "code") {
 grid.setValue(index.itemIndex, "codeName",editResult.text);
 };
};

fillLookupData

Add lookupData to lookupSource.

[Parameter List]

sourceId - string

LookupSource id

data - LookupData

LookupData you want to set

[Return Value] - void

Example:

gridView.fillLookupData("lookup1", {keys:[["14"],["15"]], values:["1,2,3,4"]});

fitLayoutWidth

Change the cell width to match the character length.

[Parameter List]

layout - string | LayoutItem

layout name or column

maxWidth - number

max width

minWidth - number

minimum width

includeHeaderText - boolean

Whether to include header text defalut true

includeFooterText - boolean

[return value] - number

Remarks:

If there are subgroups of GroupLayout, they cannot be changed automatically. If grid.displayOptions.refreshMode is "visibleOnly", the width of columns that are not displayed on the screen are not adjusted.

Example:

gridView.fitLayoutWidth('layout1')

fullItemCount

Returns the number of items displayed on the screen, excluding rows where only some of them are visible.

Remarks:

Currently, 10 rows are displayed on the screen, but if the last row is only partially visible, 9 is returned.

Example:

let totalCount = gridView.fullItemCount();

getActiveColumnFilters

Returns the name of the applied or canceled filter among registered filters.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

active - boolean

Default: true, true: returns an enabled filter, false: returns a disabled filter.

[Return Value] - ColumnFilter[]

Example:

gridView.getActiveColumnFilters('By administrative district');

getCellBounds

Returns the coordinate value of the specified cell in the grid.

[Parameter List]

itemIndex - number

order of rows

column - string | GridColumn

Column name or column object

outer - boolean

If false, the coordinates based on the grid container are returned.

[Return value] - Rectangle

Example:

let bounds = gridView.getCellBounds(3, 'By administrative district');
 
// returns {x, y, width, height}

getCheckBar

Returns configuration information related to the grid check bar to the model of CheckBar.

Example:

let checkBar = gridView.getCheckBar();
checkBar. exclusive = false;
gridView.setStateBar(checkBar);

getChildModel

Returns the child model of the item model.

[Parameter List]

parentModel - GridItem

Item model information

index - number

Index of the child model among child models

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Remarks:

Returned in the format of GridItem.

Example:

let model = gridView.getModel(3);
let child = gridView.getChildModel(model, 2);

getChildModels

Returns the child models of the item model.

[Parameter List]

parentModel - GridItem

Item model information

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem[]

Remarks:

Returns in array format of GridItem.

Example:

let model = gridView.getModel(3);
let children = gridView.getChildModels(model);

getColumn

Returns the corresponding index column.

[Parameter List]

index - number

order in grid

[Return Value] - GridColumn

Example:

let col = gridView.getColumn(0);

getColumnFilter

Returns the filter corresponding to the filter name in the specified column.

[Parameter List]

column - string | DataColumn

Name or column object of the specified column

filterName - string

filter name

[Return Value] - ColumnFilter

Example:

gridView.getColumnFilter('By administrative district', ['Previous']);

getColumnFilters

Returns filters from the specified column.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

[Return Value] - ColumnFilter[]

Example:

gridView.getColumnFilters('By administrative district');

getColumnNames

Returns the columns set in the grid.

[Parameter List]

columnsOnly - boolean

Default value: false, if false, column groups are included when returned.

visibleOnly - boolean

Default value: false, if false, hidden columns are included when returning.

[Return Value] - string[]

Example:

let onlyColsNames = gridView.getColumnNames(true, false);

getColumnProperty

Returns the properties of the corresponding column.

[Parameter List]

column - string | GridColumn

Column name or column object

prop - string

attribute name

[return value] - any

Example:

let colRenderer = getColumnProperty('colName', 'renderer');

getColumns

Returns the columns set in the grid.

[Parameter List]

[Return Value] - GridColumn[]

Example:

let cols = gridView.getColumns();

getContainer

Returns the div where the grid is located.

Example:

let gridContainer = gridView.getContainer;

getCopyOptions

When copying the grid using ctrl+c, the settings applied are returned to the CopyOptions model.

Example:

let copy = gridView.getCopyOptions();
copy.enabled = false;
gridView.setCopyOptions(copy);

getCurrent

Returns the location information of the currently focused cell.

Example:

console.log(JSON.stringify(grid.getCurrent()));

getDataDropOptions

Setting information related to data drag and drop is returned to the DataDropOptions model.

Example:

let drop = gridView.getDataDropOptions();
drop.dropMode = 'copy'
gridView.setDataDropOptions(drop);

getDataRow

Returns the unique number of the specified grid row.

[Parameter List]

itemIndex - number

order of rows

[return value] - number

Example:

let row = gridView.getDataRow(0);

getDataSource

Returns the DataProvider connected to the grid.

Example:

let ds = gridView.getDataSource();

getDescendantModels

Returns the child models of the item model.

[Parameter List]

parentModel - GridItem

Item model information

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem[]

Remarks:

Returns in array format of GridItem.

Example:

let model = gridView.getModel(3);
letdescendants = gridView.getChildModels(model);

getDisplayColumns

Returns the currently displayed columns.

Example:

let displayColumns = gridView.getDisplayColumns();

getDisplayOptions

Setting information related to grid display is returned to the model of DisplayOptions.

Example:

let display = gridView.getDisplayOptions();
display.rowHeight = 20;
gridView.setDisplayOptions(display);

getDisplayValues

Returns the data values of the specified row as a JSON object with various formats or regular expressions applied.

[Parameter List]

itemIndex - number

Order of rows to retrieve information from

useColumnName - boolean

If true, the property name of the JSON object is set to column.name, not fieldName.

[return value] - object

Example:

gridView.getDisplayValues(3);

getDisplayValuesOfRow

Returns the data values of the row specified by the row unique number as a JSON object with various formats or regular expressions applied.

[Parameter List]

dataRow - number

unique number of the row

useColumnName - boolean

If true, the property name of the JSON object is set to column.name, not fieldName.

[return value] - object

Example:

gridView.getDisplayValuesOfRow(42);

getDistinctItemValues

Returns non-duplicate values of the field.

[Parameter List]

field - number | string

Field name or field index

maxCount - number

Maximum number of cases, sorted, cut by the number of cases from the top and returned. Default: -1

sortDir - SortDirection

Sort method, default: SortDirection.ASCENDING

[Return Value] - any[]

Remarks:

Excluding rows hidden by filtering and softDeleting, the values corresponding to the specified field are returned in a sorted state, excluding duplicates.

Example:

gridView.getDistinctItemValues('field1');

getEditingItem

The grid returns information about the item being edited.

Example:

let eItemInfo = gridView.getEditingItem();

getEditOptions

Information related to the grid editing method is returned to the EditOptions model.

Example:

let edit = gridView.getEditOptions();
edit.editable = true;
gridView.setEditOptions(edit);

getEditorOptions

Returns editor display information in the EditorOptions model.

Example:

let editor = gridView.getEditorOptions();
editor.yearDisplayFormat = '{Y} year';
gridView.setEditorOptions(editor);

getEditValue

When the grid is being edited, the value of the cell currently being edited is returned.

Example:

gridView.getEditValue();

getFilteredRows

[Parameter list]

sort - boolean

Default: true, true: Return in ascending order, false: Return in the order displayed on the screen.

[Return value] - number[]

Example:

let filteredRow = gridView.getFilteredRows();

getFilteringOptions

Setting information related to grid filtering is returned to the FilteringOptions model.

Example:

let filtering = gridView.getFiteringOptions();
filtering.enabled = false;
gridView.setFiteringOptions(filtering);

getFixedOptions

Setting information about the grid fixed area is returned to the model of FixedOptions.

Example:

let fixed = gridView.getFixedOptions();
fixed.colCount = 1;
gridView.setFixedOptions(fixed);

getFooter

Returns configuration information related to the first grid footer to the GridFooter model.

Example:

let footer = gridView.getFooter();
footer.visible = false;
gridView.setFooter(footer);

getFooters

Returns the grid footer configuration information to the GridFooterCollection model.

Example:

let footers = gridView.getFooters()
footers[0].visible = false;
gridView.setFooters(footers);

getFormatOptions

Returns FormatOptions of the grid.

Example:

let format = gridView.getFormatOptions();
format.booleanFormat = 'X:O';
gridView.setFormatOptions(format);

getGroupModel

Returns the group model corresponding to itemIndex.

[Parameter List]

itemIndex - number

index of the item

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Remarks:

Returned in GridItem format.

Example:

let group = gridView.getGroupModel(1);

getGroupSummary

Returns the total information of the specified group item model.

[Parameter List]

model - GridItem

Item model information

field - string

field name

statistical - boolean

Default: false, summaryMode to statistical If set to true, if set to aggregate, set to false.

[Return Value] - GroupSummary

Remarks:

Returns meaningful values only for numeric fields.

Returned in GroupSummary format.

Example:

let group = gridView.getGroupModel(1);
let summary = gridView.getGroupSummary(group, 'fieldName', true);

getHeader

Configuration information related to the grid header is returned to the GridHeader model.

Example:

let header = gridView.getHeader();
header. sortable = false;
gridView.setHeader(header);

getHeaderSummaries

Returns the setting information of grid header summaries to the HeaderSummaryCollection model.

Example:

let headerSummaries = gridView.getHeaderSummaries()
headerSummaries[0].visible = false;
gridView.setHeaderSummaries(headerSummaries);

getHeaderSummary

Setting information related to the first grid header summary is set to HeaderSummary returns as a model.

Example:

let headerSummary = gridView.getHeaderSummary();
headerSummary.visible = false;
gridView.setHeaderSummary(headerSummary);

getIndexOfElement

Returns the location information of the cell to which the HTMLElemnt belongs.

[Parameter List]

element - HTMLElement

HTMLElement

[Return Value] - CellIndex

Remarks:

Used in customRenderer to find the index of the cell containing the element created by the user.


getInvalidCells

Returns cell information that failed value verification.

[Parameter List]

itemIndex - number

If you enter a unique number for a row, only cell information for the corresponding row is returned.

[Return Value] - InvalidCell[]

Remarks:

This function is used when executing validateCells() first, then modifying data that failed verification and then verifying it again.

Example:

let invalids = gridView.getInvalidCells();

getInvalidCellsOfRow

Among the cell information performed for value verification, the information corresponding to the entered dataRow is returned.

[Parameter List]

dataRow - number

dataRow of the row

[Return Value] - InvalidCell[]

Remarks:


getItemCount

Returns the number of Grid Items currently displayed in the grid.

Remarks:

If there is a header or footer in the rowGroup, it is included in itemCount.

Example:

let count = gridView.getItemCount();

getItemIndex

Returns the row order by the row's unique number.

[Parameter List]

dataRow - number

unique number of the row

let answerRow = gridView.getItemIndex(42);

[return value] - number


getItemsOfRows

Returns the order of the rows using the unique numbers of the input data rows.

[Parameter List]

rows - number[]

array of unique numbers for rows

[return value] - number[]

Example:

let harshadRows = getItemsOfRows([10, 12, 18, 142857]);


getItemState

Returns the status value of the item.

[Parameter List]

itemIndex - number

Index of the item whose state you want to retrieve

[Return Value] - ItemState

Example:

let itemStates = gridView.getItemState(3);

getJsonRows


getLayoutByColumn

Returns the layout information of the corresponding column.

[Parameter List]

column - string | GridColumn

Name or column object of the column about which you want to obtain information

[Return Value] - CellLayoutColumnItem

Example:

let layout = gridView.getLayoutByColumn('OrderID');

getLeftPos

Returns the x-coordinate value of the column displayed on the leftmost screen.

Example:

let leftPos = gridView.getLeftPos();

getLookupData

If there is a specified key in the specified lookupSource, keys and values are returned.

[Parameter list]

sourceId - string

LookupSource id

keys - string | string[]

key value to find

[Return Value] - LookupDataKeyValues


getMobileOptions

Returns mobile-related setting information in the MobileOptions model.

Example:

let mobile = gridView.getMobileOptions();
mobile.longTabDuration = 400;
gridView.setMobileOptions(mobile);

getModel

Returns the model corresponding to itemIndex.

[Parameter List]

itemIndex - number

index of the item

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Remarks:

Returned in GridItem format.

Example:

let model = gridView.getModel(3);

getModelAs

Returns the model corresponding to itemIndex and itemType.

[Parameter List]

itemIndex - number

index of the item

itemType - ItemType

If Item Type is omitted, it is the same as GridBase.getModel()

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Remarks:

Returned in GridItem format.

Example:

let model = gridView.getModelAs(3, 'row');

getModelOfRow

Returns the item model corresponding to the row unique number.

[Parameter List]

dataRow - number

Row unique number

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Remarks:

Returned in the format of GridItem.

Example:

let row = gridView.getModelOfRow(1);

getModels

Returns item models corresponding to the indices of the specified item.

[Parameter List]

itemIndices - number | number[]

Index array of items

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem[]

Remarks:

Returns in array format of GridItem.

Example:

let models = gridView.getModels([1,2,3]);

getModelsOfRows

Returns item models corresponding to row unique numbers.

[Parameter List]

dataRows - number | number[]

Row unique number array

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem[]

Remarks:

Returns in array format of GridItem.

Example:

let rows = gridView.getModelsOfRows([1,2,3]);

getOptions

Returns grid option information.

Remarks:

Returns to the model of GridOptions.

Example:

let options = gridView.getOptions();

getParentModel

Returns the parent item model of the item model.

[Parameter List]

model - GridItem

Item model information

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Remarks:

Returned in the format of GridItem.

Example:

let model = gridView.getModel(3);
let parent = gridView.getParentModel(model);

getPasteOptions

The settings applied when pasting into the grid are returned as a PasteOptions model.

Example:

let paste = gridView.getPasteOptions();
paste.enabled = false;
gridView.setPasteOptions(paste);

getPopupMenu

Returns pop-up menu setting information.

[Parameter List]

name - string

menu name

[Return Value] - PopupMenu

Remarks:

When importing contextMenu, enter gridContextMenu.


getRootModel

Returns the item model's highest ancestor item model.

[Parameter List]

model - GridItem

model information

extended - boolean

Whether to include extended information, default: false

[Return Value] - GridItem

Example:

const idx = gridView.getCurrent();
const item = gridView.getModel(idx.itemIndex);
const root = gridView.getRootModel(item, extended);

getRowHeight

Returns the row height.

[Parameter List]

itemIndex - number

Index of the row whose height you want to return

[return value] - number

Example:

gridView.getRowHeight(2);

getRowIndicator

Configuration information related to the grid indicator is returned to the RowIndicator model.

Example:

let indicator = gridView.getRowIndicator();
indicator. zeroBase = true;
gridView.setRowIndicator(indicator);

getRowsOfItems

Returns the unique numbers of the specified grid rows.

[Parameter List]

items - number[]

Array of rows in order

[return value] - number[]

Example:

let rows = gridView.getRowsOfItems([0, 2, 4, 6]);

getSelectedItems

Returns the indices of rows in the current selection.

[Parameter List]

dataOnly - boolean

Only data rows are returned.

[return value] - number[]

Example:

let selectedItems = gridView.getSelectedItems(true);

getSelectedRows

Returns the unique numbers of data rows in the current selection area.

Example:

let selectedRows = gridView.getSelectedRows();

getSelection

Returns information on the currently selected area.

[Parameter List]

index - number

If there are multiple selection areas, the index of the selection area

[Return Value] - Selection

Example:

let sel = gridView.getSelection();
console.log("Selection: ", JSON.stringify(sel, function(key, value) { return key.indexOf("Layout") >= 0 ? value.column : value }));

getSelectionData

Returns the values of cells included in the current selection area.

[Parameter List]

maxRows - number

Maximum number of rows to return. Default: -1. If the value is less than 0, all rows are returned without limitation.

index - number

Default index of selection area: 0

[Return value] - RowObject[]

Remarks:

Even if there are multiple selected areas, only the data of the first selected area is returned.

Example:

let selData = gridView.getSelectionData();

getSelections

Returns information on the currently selected area in array form.

Example:

let sels = gridView.getSelections();
console.log("Selection count: ", sels.length);
sels.forEach((sels) => {
 console.log("Selection: ", JSON.stringify(sel, (key, value) => {return key.indexOf("Layout") >= 0 ? value.column : value}));
})

getSelectionsData

Returns the values of cells included in the current selection area.

Remarks:

Use when there are multiple selected areas.


getSortedFields

Returns sorting information for currently sorted fields.

Example:

let sFields = gridView.getSortedFields();
 
console.log(sFields[0]);
//{
// fieldName: "COMPANYNAME"
// orgFieldName: "CompanyName"
// direction: "descending"
//}

getSortingOptions

Setting information related to grid sorting is returned to the SortingOptions model.

Example:

let sorting = gridView.getSortingOptions();
sorting.enabled = false;
gridView.setSortingOptions(sorting);

getStateBar

Returns the grid status bar setting information to the model of StateBar.

Example:

let stateBar = gridView.getStateBar();
stateBar.errorVisible = false;
gridView.setStateBar(stateBar);

getSummary

Returns the total value of the field.

[Parameter List]

field - string | number

The field name or index

type - SummaryType

Default: "sum", see SummaryType for other property values.

[return value] - number

Remarks:

The value that can be retrieved varies depending on summaryMode.

Only fields with numeric data type can get the total value.

If summaryMode is none, it is not calculated in advance.

If summaryMode is aggregate, get "sum","avg","min",'max","count", "datacount", "dataavg" You can.

In case of statistical, "var", "varp", "stdev", and "stdevp" can be additionally imported.

Example:

let sum = gridView.getSummary('unitPrice', 'sum');

getTopItem

Returns the index of the specified row at the top of the grid.

Example:

let topItem = gridView.getTopItem();

getUserCellStyle

Imports the style specified with addUserCellStyle.

[Parameter List]

dataRow - number

unique number of the row

column - string | -One

name of column

[Return value] - string | ColumnStyleObject


getValue

Returns the value of the data cell specified by the row order and data field index.

[Parameter List]

itemIndex - number

order of rows

field - string | number

Field index or field name

editing - boolean

If currently editing, whether or not to bring in the value being edited

[return value] - any

Remarks:

If the specified row is being modified, the modified value is returned. The value of a cell whose editing has not been completed cannot be retrieved.

Example:

gridView.getValue(3, 'UnitPrice');

getValues

Returns the data values of the specified row as a JSON object.

[Parameter List]

itemIndex - number

Order of rows to retrieve information from

[return value] - object

Remarks:

The unique number of the row connected to itemIndex is contained in __rowId of the returned object.

Example:

gridView.getValues('3');

getWritable

Returns whether the cell is editable.

[Parameter List]

itemIndex - number

The order of the row to retrieve information from

column - string

The name of the column or the column object

[Return Value] - boolean


hideAllColumnFilters

Hide or show all filters registered in a column. Not applied if column.autoFilter is true.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

hide - boolean

Default: true, true: hidden, false: visible.

[Return Value] - void

Remarks:

When hiding an activated filter, it is hidden in the activated state.

Example:

gridView.hideAllColumnFilters('By administrative district');

hideColumnFilters

Among the filters registered in the column, filters with filter names included in filterNames are hidden or displayed. Not applied if column.autoFilter is true.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

filterNames - string | string[]

Filter name or array of filter names

hide - boolean

Default: true, true: hidden, false: visible.

[Return Value] - void

Remarks:

When hiding an activated filter, it is hidden in the activated state.

Example:

gridView.hideColumnFilters('By administrative district', ['Previous']);

hideEditor

Closes the editor currently open in the grid.

Example:

gridView.hideEditor();

hideToast

Hide the Toast pop-up window.

[Parameter List]

action - VoidFunction

Specifies the callback function to be executed after hiding the toast window.

[Return Value] - void

Example:

const f = function () {
 console.log('hidden toast!');
}
gridView.hideToats(f);

indeterminateItem

Changes the specified item to indeterminate or removes it.

[Parameter List]

itemIndex - number

Index of the item

indeterminate - boolean

Default: true, true: indeterminate state, false: remove indeterminate state

[Return Value] - void

Example:

gridView.indeterminateItem(4, true);

indeterminateModel

Changes the indeterminate state of the model.

[Parameter List]

model - GridItem

GridItem

indeterminate - boolean

Enter the indeterminate value.

[Return Value] - void


indeterminateRow

Changes the specified data row to or from indeterminate status.

[Parameter List]

row - number

Unique row number

indeterminate - boolean

Default: true, true: indeterminate status, false: indeterminate status off

[Return Value] - void

Example:

gridView.checkRow(4);

inlineFilterFocus

filter panel에 있는 input에 포커스가 된다.

[매개변수 목록]

column - string

inline filter에 포커스를 줄 컬럼명

[반환값] - void

Example:

gridView.inlineFilterFocus("KorName");

isAllChecked

Returns whether all items are checked.

Example:

let all = gridView.isAllChecked();

isCheckable

Returns whether the check bar can be checked using the index of the specified item.

[Parameter List]

itemIndex - number

index of the item

[return value] - boolean

Example:

let isCheckable = gridView.isCheckable(4);

isCheckableModel

Returns whether the specified GridItem is checkable.

[Parameter List]

model - GridItem

GridItem

[Return Value] - boolean


isCheckableOfRow

Returns whether the check bar can be checked with the unique number of the specified item.

[Parameter List]

dataRow - number

dataRow of the item

[return value] - boolean

Example:

gridView.isCheckableOfRow(4);

isCheckedItem

If the check bar is checked, true is returned.

[Parameter List]

itemIndex - number

index of the item

[return value] - boolean

Example:

gridView.isCheckedItem(4);

isCheckedModel

Whether the specified GridItem is checked

[Parameters]

model - GridItem

GridItem

[Returns] - boolean


isCheckedRow

Is the row checked?

[Parameter List]

row - number

unique row number

[return value] - boolean

Example:

gridView.isCheckedRow(4);

isEditing

Returns true if the cell is currently being edited.

Example:

let isEditing = gridView.isEditing();

isFiltered

Returns whether a specific column in the grid is filtered.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

[return value] - boolean

Remarks:

If a column is omitted, true is returned if there is a filtered column, and if not, false is returned.

Example:

gridView.isFiltered('By administrative district');
//
gridView.isFiltered();

isIndeterminateItem

If the check bar is indeterminate, it returns true.

[Parameter List]

itemIndex - number

Item Index

[Return Value] - boolean

Example:

gridView.isIndeterminateItem(4);

isIndeterminateModel

If the check bar is indeterminate, it returns true.

[Parameters]

model - GridItem

GridItem

[Returns] - boolean


isIndeterminateRow

Whether the row is indeterminate

[Parameters]

row - number

Unique row number

[Returns] - boolean

Example:

gridView.isIndeterminateRow(4);

isItemEditing

When editing a cell is complete but not committed, true is returned if editing is in progress.

Example:

let isItemEditing = gridView.isItemEditing();

isVisible

Returns true if the grid is displayed.

Example:

let visible = gridView.isVisible();

layoutByColumn

Retrieves the layout setting information of a column using the column name.

[Parameter List]

column - string

name of column

[Return Value] - CellLayoutColumnItem

Example:

let layout = gridView.layoutByName("column");

layoutByName

Retrieves layout setting information using the name of the layout.

[Parameter List]

name - string

name of layout

[Return Value] - LayoutItem

Example:

let group = gridView.layoutByName("group");
group.direction = "vertical"

linearizeColumns

Remove all column groups and arrange only columns that display data values in a row.

[Parameter List]

sortProps - string[]

[Return Value] - void

Example:

gridView.linearizeColumns();

mouseToIndex

Returns the location information of the cell corresponding to the (x, y) coordinates.

[Parameter List]

x - number

x coordinate

y - number

y coordinate

coordianteByBody - boolean

If the coordinate is passed based on the top-left of the body, set it to true.

[Return value] - ConfigObject

Remarks:

When creating the grid, the top-left of the div element entered is calculated as 0. If coordinateByBody is entered as true, the top-left of the body is calculated as 0.

Example:

console.log(gridView.mouseToIndex(10, 10));

orderBy

Sort Grid Items based on one or more data fields.

[Parameter List]

fieldNames - string[] | string

Sorted list of field names

sortDirs - SortDirection[] | SortDirection

List of sorting methods for each field

textCases - SortCase[] | SortCase

Case sensitive

[Return Value] - void

Remarks:

Sorting is performed at the Item Model level, and the actual positions of the Data Provider rows do not change.

Example:

gridView.orderBy(['fruit'], ['descending'], ['insensitive']);
 
gridView.orderBy("fruit", "descending");

ping

Displays the message entered in the alert window.

[Parameter List]

message - any

Entered message

[Return Value] - void

Example:

gridView.ping("Test");

redo

When undoing a datasource connected to the grid, it returns to the state after modification.

Example:

gridView.redo();

refresh

The grid is redrawn internally all.

Example:

gridView.refresh()

registerColumnLayouts

Register column layouts in advance.

[Parameter List]

layouts - { name: string; items: (string | LayoutItem)[]; }[]

Column Layout Array

[Return Value] - void

Remarks:

The registered layout is applied to the grid using GridBase.setColumnLayout().

Example:

let layout =
 [{ "name": "layout1", // Name of the layout information to be registered.
 "items": ["text1", "text2"] // Column or group setting information
 },
 { "name": "layout2",
 "items": [{
 name: "group1", // Name of CellLayoutGroupItem.
 type: "group",
 items:[...]}]
 }
...
];

registerCustomRenderer

Register a custom renderer.

[Parameter List]

type - string

User-specified renderer type (name)

renderer - CustomCellRenderer

CustomCellRenderer object

[Return Value] - void

Example:

// CustomCellRenderer model
gridView.registerCustomRenderer("renderer01", {
 initContent(parent) {
 var span = this._span = document.createElement("span");
 parent.append(span);
 }
})

removeColumn

Remove the corresponding column.

[Parameter List]

name - string

[return value] - boolean

Example:

gridView.removeColumn('KorName');

removeColumnFilters

Among the filters registered in the column, filters with filter names included in filterNames are removed. Not applied if column.autoFilter is true.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

filterNames - string | string[]

Name of filter to remove or array of names of filters

[Return Value] - void

Example:

gridView.removeColumnFilters('By administrative district', ['Previous']);

removeLayout

Remove layout.

It cannot be used if layout is not set. It must be used after changing to the layout state using gridView.setColumnLayout.

[Parameter List]

layout - LayoutItem | string

layout or name of layout

[Return Value] - void

Example:

gridView.removeLayout("group0");
gridView.removeLayout("column");

removeLookupSource

Deletes the specified lookup source.

[Parameter List]

sourceId - string

LookupSource id to delete

[Return Value] - void

Example:

gridView.removeLookupSource('area1code');

removePopupMenu

Remove a specific Popup Menu from the grid.

[Parameter List]

name - string

Name of Popup Menu to be removed

[Return Value] - void

Example:

gridView.removePopupMenu('menu1');

removeUserCellStyle

Removes the style specified with addUserCellStyle.

[Parameter List]

dataRow - number | null

unique number of the row

column - string | -1 | null

name of column

[Return Value] - void

Remarks:

Entering null removes all styles applied to cells and rows.


requestPrepareEditor

After editing is complete, the cell's editor is updated when the screen is redrawn.

Remarks:

Used to change the properties of the editor according to the value of the cell.

Example:

 gridView.onCellEdited =function (grid, dataRow, itemIndex, fieldIndex) {
 if (fieldIndex === 3) {
 const val = grid.getValue(itemIndex, fieldIndex);
 if (val === "1") {
 grid.columnByName("columnName").editor = {type:"dropdown", textReadOnly: true}
 } else {
 grid.columnByName("columnName").editor = {type:"dropdown", textReadOnly: false}
 }
 grid.requestPrepareEditor();
 }
 }

resetCheckables

Initializes the Checkable state of all rows applied to CheckBar.

[Parameter List]

clearExpression - boolean

Whether to clear CheckBar's checkableExpression

[Return Value] - void


resetCurrent

Initialize the position of the focus cell to the first row and first column.

Example:

gridView.resetCurrent();

resetFilters

Releases filters registered in all columns of the grid.

Example:

gridView.resetFilters();

resetSize

Change the size of the upper DIV area of the grid explicitly when the size of the grid does not change.

[Parameter List]

callback - any

A callback to be executed after the size is reset

[Return Value] - void

Remarks:

If the grid is created before the size of the element on which the grid will be raised is determined or the style.display property of the element is none and the size of the grid is 0,

This is used when the size of the upper DIV area of the grid has been changed but the size of the grid does not change.

Example:

const f = function() {
 console.log('resized1')
}
gridView.resetSize(f)

restoreColumns

Returns the grid column positions to their initial state.

Example:

gridView.restoreColumns();

saveColumnLayout

Returns layout information of the current screen.

Example:

let layouts = gridView.saveColumnLayout();

scrollPage

Move the page based on the current time.

[Parameter List]

offset - number

The number of pages you want to navigate to, relative to the current time. Previous page is negative.

[Return Value] - void

Example:

gridView.scrollPage(3);

searchCell

Finds the cell corresponding to the values of the specified fields and returns CellIndex.

[Parameter List]

options - SearchCellOptions

Setting information model in the form of SearchCellOptions

[return value] - any

Example:

function searchCellHandler() {
 let value = "PR20012392"
 let fields = [ "RequestType", "ServiceCode" ];
 let startFieldIndex = fields.indexOf(gridView.getCurrent().fieldName) + 1;
 let options = {
 fields : fields,
 value : value,
 startIndex: gridView.getCurrent().itemIndex,
 startFieldIndex : startFieldIndex,
 wrap : true,
 caseSensitive : false;
 partialMatch : true
 }
 let index = gridView.searchCell(options);
 gridView.setCurrent(index);
}

searchItem

Finds the first row corresponding to the values of the specified fields and returns the row number.

[Parameter List]

options - SearchOptions

Setting information model in the form of SearchOptions

[return value] - number

Example:

function searchItemHandler() {
 let values = ["PR20012392", "QF24212112"]
 let fields = [ "RequestType", "ServiceCode" ];
 let startFieldIndex = fields.indexOf(gridView.getCurrent().fieldName) + 1;
 let options = {
 fields : fields,
 values: values,
 startIndex: gridView.getCurrent().itemIndex,
 startFieldIndex : startFieldIndex,
 wrap : true,
 caseSensitive : false;
 partialMatch : true
 }
 let index = gridView.searchCell(options);
 gridView.setCurrent(index);
}

setAllCheck

Check or uncheck all data rows in the grid using the options set in CheckBar.

[Parameter List]

checked - boolean

Default: true, true: checked, false, off

itemChecked - boolean

Default: true, whether display v in CheckBar.head is enabled or not.

[Return Value] - void

Remarks:

It is not affected by exclusive of CheckBar. onItemChecked() does not occur. Applies the v mark in CheckBar|CheckBar.head to the active state.

Example:

gridView.setAllCheck();

setCellStyleCallback

Change the cell style.

[Parameter List]

f - CellStyleCallback | undefined

Callback to specify cell style

[Return Value] - void

Remarks:

To set per column, you must use column styleCallback.

To set per footer or header summary, you must use the styleCallback property of the corresponding model.

Example:

const f = function (grid, cell) {
 return {
 styleName: 'custom-cell'
 editor: 'text'
 }
}
gridView.setCellStyleCallback(f);

setCheckable

Specifies whether the check bar of the specified item can be checked.

[Parameter List]

itemIndex - number

index of the item

value - boolean

Whether it is possible to check

[Return Value] - void

Example:

gridView.setCheckable(4, false);

setCheckableCallback

Set checkableCallback in CheckBar and apply it. Or perform them simultaneously.

[Parameter List]

callback - CheckableCallback

Callback for check availability

apply - boolean

Default: true, whether to apply immediately

[Return Value] - void

Example:

const f = function(dataSource, item) {
 console.log("checked!")
 return true;
}
gridView.setCheckableCallback(f);

setCheckableExpression

Set checkableExpression in CheckBar and apply it. Or perform them simultaneously.

[Parameter List]

expression - string

Formula for check availability

apply - boolean

Default: true, whether to apply immediately

[Return Value] - void

Example:

gridView.setCheckableExpression("row % 2 = 1");

setCheckableOfRow

Specifies whether the check bar of the specified row can be checked.

[Parameter List]

dataRow - number

dataRow of the item

value - boolean

Whether it is possible to check

[Return Value] - void


setCheckBar

Set the grid check bar's configuration information to the model of CheckBar.

[Parameter List]

value - CheckBar

CheckBar Information such as the model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setCheckBar({exclusive: true});

setColumn

Change the information of the column set in the grid.

[Parameter List]

value - ConfigObject

Information to change. The name of the column or an object of the model, such as GridColumn.

[Return Value] - void

Remarks:

To reset column information, you must first retrieve the existing setting information using columnByName.

Example:

let col = {
 name: 'existed column'
}
col.editor = {
 type: 'text'
}
gridView.setColumn(col);

setColumnFilters

Set a filter on the grid column.

[Parameter List]

column - string | DataColumn

Name or column object of the column to be set

filters - ColumnFilter[]

Array of filter objects, array of ColumnFilter

[Return Value] - void

Remarks:

Refer to Expression for available operators and variables.

Example:

let filters = [{
 name: "Jeon",
 criteria: "value = 'Jeon'"
 }, {
 name: "Answer",
 criteria: "value = 'answer'"
 }, {
 name: "'Forest land' or 'factory land'",
 criteria: "(value = 'forest') or (value = 'factory land')"
 }, {
 name: "Land: value > 'Land'",
 criteria: "value > 'Earth'"
 }];
 
gridView.setColumnFilters('Column', filters);

setColumnLayout

Set the column layout of the grid.

[Parameter List]

layout - string | (string | LayoutItem)[]

Layout information to change

[Return Value] - void

Remarks:

When entering string, it is set to a pre-registered layout.

Example:

layout = [{
 "OrderID",
 {
 name: "companyGroup",
 items: [
 "Country",
 50,
 50,
 {
 column: "CompanyName",
 cellSpan: 2
 },
 50,
 50
 ],
 header: {
 text: "Company Group",
 visible: true
 }
 }
 }
];
gridView.setColumnLayout(layout)

setColumnProperty

Change specific attribute information of a column set in the grid.

[Parameter List]

column - string | GridColumn

Column name or column object

prop - string

attribute name

value - any

change value

[Return Value] - void

Remarks:

If you want to change the properties within the editor property, you must re-specify the entire editor.

If you change values, labels, they cannot be changed with setColumnProperty() and cannot be changed with [setColumn()](/refs The column must be respecified with /Class/GridBase#setcolumn).

Example:

gridView.setColumnProperty('colName', 'editor', {
 type: 'text'
});

setColumns

Remove all previously set columns and reorganize the grid with new columns.

[Parameter List]

columns - (DataColumn | SeriesColumn | LiteralColumn | [ConfigObject](/refs /realgrid#configobject) | string)[]

Array of column setting information for objects such as GridColumn

[Return Value] - void

Example:

 let cols = [{
 "name": "EmployeeID",
 "fieldName": "EmployeeID",
 "type": "data",
 "width": "90",
 "header": {
 "text": "Employee ID"
 }
 }, {
 "name": "OrderDate",
 "fieldName": "OrderDate",
 "type": "data",
 "width": "130",
 "header": {
 "text": "Order Date"
 }
 }]
 
 gridView.setColumns(cols);

setContextMenu

Specify menu items to be added to the context menu displayed when right-clicking on the grid.

[Parameter List]

menuItems - (PopupMenu | PopupMenuItem)[]

Menu information arrangement

[Return Value] - PopupMenu

Remarks:

When the menu is clicked, the onContextMenuItemClicked callback is called.

Example:

let menu = [{
 label: "menu1.",
 children: [{
 label: "This is submenu1."
 }, {
 label: "This is submenu2."
 }]
 }, {
 label: "This is menu2",
 }, {
 label: "-"
 }, {
 label: "This is menu3",
 type: "check",
 checked: true,
 tag: "check_menu"
 }];
 
gridView.setContextMenu(menu);

setCopyOptions

Set copy information to the CopyOptions model.

[Parameter List]

options - CopyOptions

CopyOptions Configuration information such as models. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setCopyOptions({enabled: false});

setCurrent

Specifies the location of the focus cell.

[Parameter List]

current - CellIndex

Cell location information

select - boolean

Whether to initialize the selection area

[Return Value] - void

Remarks:

For rows, one of itemIndex or dataRow can be specified, and for columns, one of column (column name), fieldIndex, or fieldName can be specified.

However, if applied multiple times, they will be applied first in order from the latter.

Example:

gridView.setCurrent({ itemIndex: 1, column: 'By administrative district' });

setDataDropOptions

Configuration information related to data drag and drop is set to the DataDropOptions model.

[Parameter List]

options - DataDropOptions

Setting information such as DataDropOptions. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setDataDropOptions({dropMode: 'copy'});

setDataSource

Connect the Data Provider to the grid.

[Parameter List]

dataProvider - LocalDataProvider | LocalTreeDataProvider

DataProvider object.

[Return Value] - void

Example:

let dataProvider = new RealGrid.LocalDataProvider();
gridView = new RealGrid.GridView("realgrid");
gridView.setDataSource(dataProvider);

setDisplayOptions

Set grid display information to the DisplayOptions model.

[Parameter List]

options - DisplayOptions

DisplayOptions Setting information such as model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setDisplayOptions({rowResizable: true});

setEditOptions

Information related to the grid editing method is reset to the EditOptions model.

[Parameter List]

options - EditOptions

EditOptions Configuration information, such as models. You only need to pass the values you want to change.

[Return Value] - void

Example:

gridView.setEditOptions({editable: false});

setEditorOptions

Set the editor display information to the EditorOptions model.

[Parameter List]

options - EditorOptions

EditorOptions Configuration information, such as models. You only need to pass the property you want to change.

[return value] - void

Remarks:

When changing the display format of the date editor, it must be set before the calendar pop-up is first run (created) (it cannot be changed once it is run).

Example:

gridView.setEditorOptions({yearDisplayFormat: "{Y} year"});

setEditValue

Sets the value in the cell where focus is located.

[Parameter List]

value - any

the value you want to set

startEdit - boolean

Default: false, true: Set a value and show the editor if the cell is not being edited. false: Do not set a value.

dropdown - boolean

Default value: true, false: In the case of editors with dropdown, such as dropdownCellEditor, dateCellEditor, etc., dropdown is not displayed.

[Return Value] - void

Example:

gridView.setEditValue('newValue');

setFilteringOptions

Set information related to grid filtering in the FilteringOptions model.

[Parameter List]

options - FilteringOptions

FilteringOptions Configuration information, such as models. You only need to pass the property you want to change.

[Return Value] - void

Remarks:

FilterSelectorOptions, FilterAutomatingOptions, ToastOptions are properties. You have to access it directly and fix it.

Example:

gridView.setFilteringOptions({enabled: false});

setFilterPanel

Set the filter panel setting information to the FilterPanel model.

[Parameter List]

value - FilterPanel

FilterPanel Information such as models. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setFilterPanel({height: 30, visible: true, filterDelay: 500});

setFixedOptions

Set information about the grid fixed area as a model in FixedOptions.

[Parameter List]

options - FixedOptions

FixedOptions Setting information such as models. You only need to pass the values you want to change.

[Return Value] - void

Example:

gridView.setFixedOptions({colCount: 2});

setFocus

The grid is focused.

Example:

gridView.setFocus();

setFooter

Set the configuration information of the first grid footer to the GridFooter model.

[Parameter List]

value - GridFooter

GridFooter Information such as the model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setFooter({className: 'custom-footer-1'});

setFooters

Set the grid footer configuration information to the collection model of GridFooter.

[Parameter List]

value - GridFooterCollection | GridFooter[]

Information such as the GridFooterCollection model. You only need to pass the property you want to change.

[Return Value] - void

Example:

//object
gridView.setFooters({
 visible: false;
 items: [
 {
 styleName: 'custom-footer-1';
 },
 {
 styleName: 'custom-footer-2';
 },
 ]
});
 
//array
gridView.setFooters([
 {
 styleName: 'custom-footer-1';
 },
 {
 styleName: 'custom-footer-2';
 },
 ]);

setFormatOptions

Set FormatOptions of the grid.

[Parameter List]

options - FormatOptions

FormatOptions Configuration information such as models. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setFormatOptions({booleanFormat: 'wrong:correct'});

setHeader

Set the grid header setting information to the GridHeader model.

[Parameter List]

value - GridHeader

GridHeader Information such as model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setHeader({sortable: false});

setHeaderSummaries

Set grid header summaries to the HeaderSummaryCollection model.

[Parameter List]

value - HeaderSummaryCollection | HeaderSummary[]

HeaderSummaryCollection Information such as the model. You only need to pass the property you want to change.

[Return Value] - void

Example:

//object
gridView.setHeaderSummaries({
 visible: false;
 items: [
 {
 styleName: 'custom-hsumarry-1';
 },
 {
 styleName: 'custom-hsumarry-2';
 },
 ]
});
 
//array
gridView.setFooters([
 {
 styleName: 'custom-hsumarry-1';
 },
 {
 styleName: 'custom-hsumarry-2';
 },
 ]);

setHeaderSummary

Set the configuration information of the first grid header summary to the HeaderSummary model.

[Parameter List]

value - HeaderSummary

HeaderSummary Information such as model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setHeaderSummary({styleName: 'custom-hsummary-1'});

setLeftCol

gridThe specified column is located on the left border.

[Parameter List]

column - string | number

Column name or index

[Return Value] - void

Example:

gridView.setLeftCol(10);

setLeftPos

The left border of the grid is located at the specified value.

[Parameter List]

position - number

x-coordinate value

[Return Value] - void

Example:

gridView.setLeftPos(10);

setLookups

Register lookup sources to be used in the lookup tree.

[Parameter List]

sources - LookupSource[]

LookupSource Object array

[Return Value] - void

Remarks:

If you want to add to the existing ID, use fillLookupData().

Example:

let area1codes = {
 id: "area1code",
 levels: 1,
 keys: ['11', '21'],
 values: ['Seoul Metropolitan City', 'Busan Metropolitan City']
}
 
let area2codes = {
 id:"area2code",
 levels:2,
 keys: [['11', '11010'], ['11', '11020']],
 values: ['Jongno-gu', 'Jung-gu']
};
 
gridView.setLookups([area1codes, area2codes]);

setMobileOptions

Set mobile-related setting information using the MobileOptions model.

[Parameter List]

options - MobileOptions

MobileOptions Setting information such as model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setMobileOptions({longTapDuration: 300});

setOptions

Reset grid option information.

[Parameter List]

options - GridOptions

Setting information

[Return Value] - void

Remarks:

Unlike getOptions, which returns only grid-level information, this method allows you to reset child components and other execution information at the same time. Set to the model of GridOptions.

Example:

let options = {
 summaryMode: 'aggregate',
 displayOptions: {
 columnResizable : false
 }
};
gridView.setOptions(options);

setPasteOptions

Set paste information in the grid using the PasteOptions model.

[Parameter List]

options - PasteOptions

Setting information such as PasteOptions model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setPasteOptions({enabled: false});

setProgress

Sets the state of the progress bar.

[Parameter List]

min - number

minimum value

max - number

maximum value

position - number

Current value between min and max

message - string

String to be displayed at the bottom of the progress bar, default string output if not specified

[Return Value] - void

Remarks:

Set the current minimum/maximum progress value and display text to be displayed on the screen.

Example:

gridView.setProgress(0, 100, 50);

setRowHeight

Change the row height to the specified height.

[Parameter List]

itemIndex - number

Order of rows whose height you want to change

height - number

Default: 0, row height. When specified as 0, the row height is changed to match displayOptions.minRowHeight, maxRowHeight.

refresh - boolean

Default value: true, whether to immediately reflect the changed row height on the screen.

[Return Value] - void

Example:

gridView.setRowHeight(2, 40);

setRowIndicator

Set the configuration information related to the grid indicator to the RowIndicator model.

[Parameter List]

value - RowIndicator

Information such as the RowIndicator model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setRowIndicator({zeroBase: true});

setRowStyleCallback

Change the row style.

[Parameter List]

f - RowStyleCallback

Callback to specify row style

[Return Value] - void

Example:

const f = function(grid, item, fixed) {
 if (fixed) {
 return 'custom-fixed-row';
 }
 else {
 return 'custom-data-row';
 }
}
gridView.setRowStyleCallback(f)

setSelection

Specifies the area to select in the grid.

[Parameter List]

item - Selection

Selection Setting information such as model. You only need to pass the properties of the area you want to select.

eventFire - boolean

Does not generate selection-related events.

[Return Value] - void

Remarks:

If there is an existing selection area, it will be removed.

Example:

let sel = {
 style: "block",
 startItem: 2;
 startColumn: "Nominate",
 endItem: 3;
 endColumn: "Unit"
}
gridView.setSelection(sel);

setSortingOptions

Set information related to grid sorting in the SortingOptions model.

[Parameter List]

options - SortingOptions

SortingOptions Configuration information, such as models. You only need to pass the property you want to change.

[Return Value] - void

Remarks:

ToastOptions must be accessed directly as a property and modified.

Example:

gridView.setSortingOptions({enabled: false});

setStateBar

Set the grid status bar setting information to the model of StateBar.

[Parameter List]

value - StateBar

StateBar Information such as the model. You only need to pass the property you want to change.

[Return Value] - void

Example:

gridView.setStateBar({errorVisible: true});

setTopItem

It is located in the specified row at the top of the grid.

[Parameter List]

itemIndex - number

Default: 0, index of the row you want to place at the top of the grid

[Return Value] - void

Example:

gridView.setTopItem();

setValidations

Sets a list of row-level edit verification conditions.

[Parameter List]

value - EditValidation[] | EditValidation | string | string[]

EditValidation Array or validation expression of setting information such as model

[Return Value] - void

Example:

// string
gridView.setValidations("values['UnitPrice'] > 100");
 
// object
gridView.setValidations({
 message: 'Too expensive!',
 criteria: "values['UnitPrice'] > 100"
})
 
// Arrangement
gridView.setValidations([{
 message: 'Too expensive!',
 criteria: "values['UnitPrice'] > 100"
}])

setValue

Change the row order and the value of the data cell specified by the data field index.

[Parameter List]

itemIndex - number

order of rows

field - string | number

Field index or field name

value - any

Value to set for field

[Return Value] - void

Remarks:

If the grid is being edited, only the value of the itemIndex being edited can be changed. After editing is completed, the value is reflected in the dataProvider. If the grid is not being edited, it is immediately reflected in the dataProvider.

Example:

gridView.setValue(3, 'UnitPrice', 52);

setValues

Modifies the values of multiple fields in a specified row.

[Parameter List]

itemIndex - number

Index of the row to retrieve information from

values - any[] | object

Data values of the field to be modified

strict - boolean

Default value: false, true If the field value is set to undefined, the existing value is maintained.

[Return Value] - void

Example:

gridView.setValues(3, [123, 142, 'happy', 133]);

setVisible

Show or hide the grid.

[Parameter List]

value - boolean

true: Show grid, false: Hide grid

[Return Value] - void

Example:

gridView.setVisible(false);

showEditor

Displays the grid editor in the currently located cell.

Remarks:

If the grid is in an uneditable state (editable: false), the editor is not displayed.

Example:

gridView.showEditor();

showFilterSelector

Displays the filter selector.

[Parameter List]

column - string

Column object or column name where the filter selector will be displayed

searchText - string

Enter the string you want to search for

[return value] - boolean

Remarks:

If there is no filter in the column, it is not displayed.


showLoading

Display loading animation.

[Parameter List]

disabled - boolean

If true, mouse and keyboard operation is blocked. - Default: false,

[Return Value] - void

Example:

gridView.showLoading();

showMessage

Displays a message in a cell or at a specified location on the screen.

[Parameter List]

message - string | TooltipOptions

Specifies the message to be displayed on the screen in the form of string or TooltipOptions.

x - number | CellIndex

Specifies the value of the x axis in the form of number or CellIndex.

y - number

Specifies the value of the y axis.

[Return value] - void

Remarks:

If x, y are specified as number, they are displayed at the specified location from the top left of the grid. If x is specified as CellIndex, they are displayed at the bottom left of the cell.

Example:

// Display a message at the bottom left of the currently selected cell
gridView.showMessage("user message", grid.getCurrent());
 
// Display a message at a specific location in the grid
gridView.showMessage("<span style='color:red'>User</span>\n<span style='color:blue'>Message</span>", 100, 100);
 
// Message that disappears after a specified time
gridView.showMessage({message: "Message that disappears automatically", hideDuration: 10000}, grid.getCurrent());

showProgress

Displays a progress bar.

Remarks:

A Progress Bar notifying progress is displayed on the screen.

Progress values and string information are set through setProgress().

Example:

gridView.showProgress();

showToast

Displays the Toast pop-up window.

[Parameter List]

options - ToastOptions

Specifies the message and whether to display the message, an object of the same model as ToastOptions. Basically, you only need to specify a message.

force - boolean

Specifies whether to force the display again when the existing toast window is displayed.

[Return Value] - void

Example:

let config = {
 message: 'Toast!'
}
gridView.showToast(config, true);

toggleAllColumnFilters

Toggles all filters specified for the corresponding column.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

[Return Value] - void

Example:

gridView.toggleAllColumnFilters('By administrative district', ['All']);

toggleColumnFilters

Toggles the specified filters for the corresponding column.

[Parameter List]

column - string | DataColumn

Name of the corresponding column or column object

filterNames - string | string[]

Name of filter to toggle or array of names of filters

[Return Value] - void

Example:

gridView.toggleColumnFilters('By administrative district', ['Before', 'Answer']);

undo

Returns the datasource connected to the grid to its previous state.

Example:

gridView.undo();

unregisterAllCustomRenderer

Unregister all custom renderers.

Example:

gridView.unregisterAllCustomRenderer('Renderer01');

unregisterCustomRenderer

Unregister the custom renderer.

[Parameter List]

type - string

Type of renderer to release (name)

[Return Value] - void

Example:

gridView.unregisterCustomRenderer('Renderer01');

validateCells

Rather than verifying upon input, verification is performed on the data in the grid in batches.

[Parameter List]

itemIndices - number[] | null

Row indices of the grid, if specified as null, verification is performed on all rows of the grid.

visibleOnly - boolean

Default value: true, if false, invisible rows such as collapsed nodes in the tree grid are also included in the verification target. false applies only when checking the entire row.

pageAllItems - boolean

If true, verification is performed on the entire row, not the current page. Default value: false,

columns - string | string[]

Specify the names or array of columns to be validated, and only the entered columns will be validated.

[return value] - object

Remarks:

Verification is performed using column validation and row validation is not performed.

Example:

gridView.validateCells(null, false);