It returns whether or not to automatically adjust the width of the cell to fit the width of the text shown when double-clicking the width adjustment area of a cell for which resizable is true.
When editing the suppressed detail cell, whether to modify only the value of the edit row,
Returns whether or not to change the values of all the suppressed and visible cells.
The Grid Data is passed to the function that receives the attribute array for each cell in the order shown on the screen in row units (including header, detail, footer, group header, and group footer).
CAnimationEvent Event that occurs at the start of the animation.
before-cell-moved
CGridEvent An event that occurs before moving a cell in the grid.
data: {sourceHeaderIndex : number, targetHeaderIndex: number, before: boolean}
Source and target information of the cell to be moved.
before-cell-resized
CGridEvent Event raised before resizing the Grid Cell.
data: {oldHeaderCellWidth: string, newHeaderCellWidth: string, cellIndex: number}
Before and after size information of the cell whose size you want to change.
before-context-value-change
CValueChangeEvent Use a bind context in a control that has a bind context
An event that occurs before the value changes.
before-delete
CGridEvent An event that occurs before a row in the Grid is deleted.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
row: {cpr.controls.provider.GridRow} The row object to be deleted.
rowIndex: {number} The row index to be deleted.
before-draw
CUIEvent This event is called just before group content is drawn.
It is only used for dynamically constructing internal content.
before-editrow-change
CGridEvent Event that occurs before the edit row of the Grid is changed.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
newSelection: {cpr.controls.provider.GridRow} The row object that will be the current edit state.
isCommit: {boolean} Whether to reflect the data being edited.
before-insert
CGridEvent An event that fires before a row in the Grid is added.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
before-paste
CGridEvent Event that fires before copying when copying with ctrl + p in the Grid.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
row: {cpr.controls.provider.GridRow} The row object on which the paste was executed.
rowIndex: {number} The row index at which the paste was executed.
cellIndex: {number} The cell index where the paste was executed.
columnName: {number} The columnName of the cell where the paste was executed.
data: {string} Data to paste.
before-selection-change
CSelectionEvent Event that occurs before the unit corresponding to the set selectionunit is selected by clicking the detail cell.
oldSelection: {number[] | gridpart.selection.CellPosition[]} The previously selected index or array of cellPositions.
newSelection: {number[] | gridpart.selection.CellPosition[]} currently selected index or array of cellPosition
before-update
CGridEvent An event that fires before the grid's row data is modified.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
row: {cpr.controls.provider.GridRow} The row object to be modified.
rowIndex?: {number} The row index to be modified.
columnName?: {string} The column name to be modified.
oldValue?: {any} Value before modification.
newValue?: {any} The value to be modified.
blur
CFocusEvent An event that occurs after the control loses focus.
cell-click
CGridEvent An event that occurs when a cell in the grid is clicked.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
row: {cpr.controls.provider.GridRow} The row object of the clicked cell.
rowIndex: {number} The row index of the clicked cell.
cellIndex: {number} The cell index of the clicked cell.
columnName: {number} columnName of the clicked cell.
cellBoundingRect: {geometry.Rectangle} The actual size of the detail cell where the event occurred.
cell-mouseout
CGridEvent Event that occurs when cell mouseout of Grid.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
row: {cpr.controls.provider.GridRow} The row object of the cell where the event was triggered.
rowIndex: {number} The row index of the cell where the event was triggered.
cellIndex: {number} The cell index of the cell where the event was triggered.
columnName: {number} The columnName of the cell where the event was triggered.
cellBoundingRect: {geometry.Rectangle} The actual size of the detail cell where the event occurred.
cell-mouseover
CGridEvent An event that occurs when the Grid cell mouseover occurs.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
row: {cpr.controls.provider.GridRow} The row object of the cell where the event was triggered.
rowIndex: {number} The row index of the cell where the event was triggered.
cellIndex: {number} The cell index of the cell where the event was triggered.
columnName: {number} The columnName of the cell where the event was triggered.
cellBoundingRect: {geometry.Rectangle} The actual size of the detail cell where the event occurred.
cell-moved
CGridEvent An event that occurs when a cell in the grid is moved.
data: {sourceHeaderIndex : number, targetHeaderIndex: number, before: boolean}
Source and target information of the moved cell.
cell-resized
CGridEvent Event raised when the size of the Grid Cell is resized.
data: {oldHeaderCellWidth: string, newHeaderCellWidth: string, cellIndex: number}
Size information before and after the cell whose size has been changed.
click
CMouseEvent An event that occurs when the user clicks the control.
collapse
CGridEvent Event raised when the RowGroup of the Grid is collapsed.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail, rowgroup)
rowgroup : {cpr.controls.provider.GridRowGroup} The rowgroup object where the event occurred (collapsed).
context-value-change
CValueChangeEvent Use a bind context in a control that has a bind context
An event that occurs after the value changes.
contextmenu
CMouseEvent When the right mouse button is clicked or the context menu key is pressed,
Event called.
copy
CGridEvent Event that occurs when the selected element of the Grid is copied with ctrl + c .
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
data: {string} The copied data. Currently selected data.
dblclick
CMouseEvent An event that occurs when the user double-clicks the control.
delete
CGridEvent Event when a row in the Grid is deleted.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail)
dispose
CEvent The event that is called when the control is dispose.
dragenter
CMouseEvent When the mouse pointer enters the elements included in the control while dragging
Events that occur.
dragleave
CMouseEvent During the drag, the mouse pointer may have exited the elements contained in the control.
The event that occurs when.
dragover
CMouseEvent While dragging the source control with the mouse, the mouse pointer
An event that occurs when moving within a region.
drop
CMouseEvent Drag the source control to the target control while dragging the source control with the mouse.
Event that fires when dropping.
expand
CGridEvent Event that occurs when the RowGroup of the Grid is expanded.
relativeTargetName: {string} The target name in the grid where the event occurred. (detail, rowgroup)
rowgroup : {cpr.controls.provider.GridRowGroup} The rowgroup object where the event occurred (expanded).
Keyboard shortcut Sets a single character (letter or number).
The shortcut key is [alt] + [shortcut key] for Windows or [option] + [shortcut key] for Mac.
Gets the accessibility-related ARIA properties or gets the context in which they can be specified.
autoFit
type
String
get
Returns information about automatically resizing cells.
set
Set whether to automatically resize cells to fit the width of the specified area.
[none]: It does not use the function and is set to the specified width.
[all]: All columns have the ratio of the corresponding size (100px, 200px, 400px-> 1: 2: 4) and are set to the width of the grid.
It does not occur when the grid width is exceeded.
[columnindex]: When a specific column index is specified, only the column size is adjusted to fit the width of the designated area.
Multiple columns can be set through the comma (,) separator.
autoRowHeight
type
String
get
Automatically adjusts the row height to fit the cell data length.
set
Set whether to automatically adjust the row height to fit the cell data length. The minimum value is the set row height.
(Basic cell, output, text area, HTML snippet, UDC.)
[none]: This function is not used and is set to a fixed height.
[all]: Automatically adjusts the row height according to the data length of all columns.
[cellindex]: When a specific cell index is specified, the row height is automatically adjusted according to the data length of the cell.
Multiple columns can be set through the comma (,) separator.
bottomSplit
type
Number
get
Returns the fixed number of rows at the bottom of the detail area.
set
Set the number of ROW fixed at the bottom of the Detail area.
When using Grouping and Treecell, we do not support TOPSPLIT and BOTTOMSPLIT -related settings.
bottomSplitHeight
type
Number
get
Returns the default height of the area to be fixed at the bottom of the Detail area.
set
Returns the default height of the area to be fixed at the bottom of the Detail area.
caption
deprecated2019.06.12 Deprecated property.
type
String
get
Returns a description (caption) to the grid.
set
Sets the description (caption) on the grid.
clickMode
type
String
get
Returns action via click
[select]: Click mode will be activated when clicked.
[edit]: Click to operate in edit mode.
set
Set action via click
[select]: Click mode will be activated when clicked.
[edit]: Click to operate in edit mode.
collapsible
type
Boolean
get
Returns whether to allow the group to be collapsed when using rowgroup.
set
Sets whether or not to collapse the group when using rowgroup.
columnCount
type
Number
readonly
Returns the number of grid columns.
columnMovable
type
Boolean
get
Returns whether the Header can be moved.
set
Set whether the header can be moved.
If a control that provides a separate function through drag is placed in the header cell, column movement is not possible.
(Target controls: input box, date input, number editor, mask editor, search input, combo box, file input, text area)
Returns the default behavior when a header that supports multiple sorts is clicked.
set
Set the default behavior when clicking on a header that supports multiple sorting.
Applied when the value of the header column property [sortable] is true.
[multi]: Set multi-sort as the default operation. Single sort when (alt+click header).
[single]: Set single sorting as the default action. Multiple sorting when (ctrl+click header).
Returns whether the value can be changed by user action.
UIControl (Output, etc.) that does not allow input returns false.
In the case of an inputtable UIControl, returns true if the binding context in which the value is bound is valid.
Otherwise, it returns false even if it is an inputtable UIControl.
Accordion/Button/Group/Dialog/EmbeddedApp/EmbeddedPage/Grid/HTMLObject/Image/MDIFolder/Menu/
NavigationBar/Notifier/Output/Progress/TabFolder/Shell/FileUpload
In the case of the above control, editable is always false.
It returns whether or not to automatically adjust the width of the cell to fit the width of the text shown when double-clicking the width adjustment area of a cell for which resizable is true.
[false] : Double-click does not work.
[true] : When double-clicked, the cell width is automatically adjusted to fit the text width.
set
Set whether to automatically adjust the width of the cell to fit the width of the text shown when double-clicking the width adjustment area of a cell for which resizable is true.
[false] : Double-click does not work.
[true] : When double-clicked, the cell width is automatically adjusted to fit the text width.
Returns a grid footer area object
You can access the API related to the footer area.
hScroll
type
String
get
Returns the horizontal scroll style.
set
Set the horizontal scroll style.
[auto]: Scrolling is automatically set according to the size of the inner area.
[scroll]: Scroll is set regardless of the size of the inner area.
[hidden]: Scroll is set to be invisible regardless of the size of the inner area.
Returns the number of cells to be frozen (screen split) to the left of the grid.
set
Set the number of cells to be fixed (split screen) to the left of the grid.
If you set all cells in grid to leftSplit or rightSplit, vertical scroll is not visible,
It is recommended not to set all cells to leftSplit or rightSplit as movement and scrolling using the arrow keys in the grid do not work.
Related properties: [leftSplitWidth] If leftSplitWidth is 0, the left segment is not shown even if leftSplit is set.
leftSplitWidth
type
Number
get
Grid Returns the width (px) of the area to be frozen to the left (screen splitting).
set
Sets the width (px) of the area to be fixed to the left of the grid (screen splitting).
Related property: [leftSplit] If leftSplit is not specified, the left partition is not split.
Returns a message to be shown when there is no data in the detail area.
set
Sets the message to be shown when there is no data in the detail area.
(If there is an up / down / left / right fixed area, the corresponding text is placed in the center area of the detail area.)
Returns a value that defines the parent's scrolling behavior when the end of the scrollable area is reached by the mouse wheel or touch event.
The default value is AUTO, which delegates scrolling behavior to the parent.
set
Sets a value that defines the parent's scrolling behavior when the end of the scrollable area is reached by the mouse wheel or touch event.
OverscrollBehaviorType.AUTO: Delegates scrolling behavior to parent.
OverscrollBehaviorType.NONE: Blocks propagation to the parent.
pasteMode
type
String
get
Returns the paste (ctrl + v) method.
[all]: Pasted to all controls except those with enabled = false and readOnly = true. (default)
[editable]: Pasted only to editable controls. (Example of excluded control: Output, Input (disabled))
[none]: Paste is not supported.
set
Set the paste (ctrl + v) method.
[all]: Pasted to all controls except those with enabled = false and readOnly = true. (default)
[editable]: Pasted only to editable controls. (Example of excluded control: Output, Input (disabled))
[none]: Paste is not supported.
pasteValidation
type
Boolean
get
Returns whether to validate when pasting (ctrl + v).
When validating, invalid values are not pasted.
Cells that do not require additional validation, such as basic cells and outputs, are pasted as they are.
set
Sets whether to check validation when pasting (ctrl + v).
When validating, invalid values are not pasted.
Cells that do not require additional validation, such as basic cells and outputs, are pasted as they are.
Returns whether a non-modifiable read-only mode is in effect.
set
Sets whether to enable read-only mode, which can not be modified.
resizableColumns
type
String
get
Returns whether it is possible to adjust the size of the header.
set
Set whether header size can be adjusted.
[none]: All columns do not change size.
[all]: All columns can be resized.
[columnindex]: When specifying a specific column index, only that column can be resized.
You can set multiple columns using the comma (,) separator.
rightSplit
type
Number
get
Grid Returns the number of cells to be frozen to the right (split screen).
set
Set the number of cells to be fixed (split screen) to the right of the grid.
If you set all cells in grid to leftSplit or rightSplit, vertical scroll is not visible,
It is recommended not to set all cells to leftSplit or rightSplit as movement and scrolling using the arrow keys in the grid do not work.
rightSplitWidth
type
Number
get
Grid Returns the width (px) of the area to be frozen to the right (screen splitting).
set
Grid Sets the width (px) of the area to be fixed to the right (screen splitting).
rowCount
type
Number
readonly
Returns the number of rows.
rowIndexerStartNum
type
Number
get
Returns the starting index of the row index shown in the grid.
set
Sets the starting index of the row index shown in the grid.
selectionMulti
type
String
get
Returns whether multi-selected.
set
Set whether to select multiple.
[none]: Prevent selection.
[single]: Supports single selection
[multi]: Supports multiple selection.
selectionUnit
type
String
get
Returns the units from which the grid can be selected.
set
Set the units from which you can select a grid.
[cell]: Support cell selection.
[row]: supports row selection.
[column]: Supports column-by-column selection.
showDeletedRow
type
Boolean
get
Returns whether to show deleted rows.
set
Sets whether to show deleted rows.
showExtraRow
type
Boolean
get
If the detail area is not full of data rows,
Returns a setting whether to fill grid lines in the margins.
set
If the detail area is not full of data rows,
Sets whether to fill grid lines in the margins.
Returns the style settings of the control.
In case of style changes, only the corresponding control is updated.
Propagation from style changes does not occur.
When editing the suppressed detail cell, whether to modify only the value of the edit row,
Returns whether or not to change the values of all the suppressed and visible cells.
set
When editing the suppressed detail cell, whether to modify only the value of the edit row,
Set whether to change the values of all the cells that are suppressed.
suppressedCellType
type
String
get
Returns whether the suppressed detail cell is expressed as split or merged.
[split]: When the same value is repeated, the first value is output and the remaining values are omitted. (default)
[merged]: Provides the effect of merging cells of repeated values when the same value is repeated.
set
Set whether to display Suppressed detail cells in split or merged format.
[split]: When the same value is repeated, the first value is output and the remaining values are omitted. (default)
[merged]: Provides the effect of merging cells of repeated values when the same value is repeated.
tabIndex
type
Number
get
Returns the control focus sequence using the Tab Key.
This property controls the tabindex in HTML.
set
Set the control focus order using Tab Key.
This property controls the tabindex in HTML.
Returns the tab movement method.
[all] : You can move the entire cell by tab. (Including both default cell and Output) (default)
[editable] : Only editable controls are tabbed. (Example of control that cannot move tab: Output, Input(disabled))
[focusable] : Only focusable controls are tabbed. (Affected by tabIndex.)
[none] : Tab movement is not supported.
set
Set the tab movement method.
[all] : You can move the entire cell by tab. (Including both default cell and Output) (default)
[editable] : Only editable controls are tabbed. (Example of control that cannot move tab: Output, Input(disabled))
[focusable] : Only focusable controls are tabbed. (Affected by tabIndex.)
[none] : Tab movement is not supported.
Returns a description of the control
It works when mouse over.
set
Set a description for the control.
It works when mouse over.
topSplit
type
Number
get
Returns the number of rows fixed at the top of the Detail area.
set
Set the number of ROW fixed at the top of the Detail area.
When using Grouping and Treecell, we do not support TOPSPLIT and BOTTOMSPLIT -related settings.
topSplitHeight
type
Number
get
Returns the default height of the area to be fixed at the top of the Detail area.
set
Sets the default height of the area to be fixed at the top of the Detail area.
Returns the signature string of the Control's unique Type that can distinguish the Control.
Please refer to ControlType for available constant values.
For UDC controls, each unique type name is returned. Example: udc.MyUDC
Set the vertical scroll style.
[auto]: Scrolling is automatically set according to the amount of data in the detail area.
[scroll]: Scrolling is set regardless of the amount of data in the detail area.
[hidden]: Scroll is set to be invisible regardless of the amount of data in the detail area.
Returns the style property for controlling css visibility.
set
Sets the style property to control css visibility.
wheelRowCount
type
Number
get
Returns the number of rows to scroll at a time with the wheel.
set
Sets the number of rows to scroll at a time with the wheel.
Methods
addColumn(column)
Add a grid column.
The added column is placed at the end.
The colIndex of the column to be added is written based on 0 base, or
It must be written with the colIndex corresponding to the position to be added.
Add a listener to the control that will run only once per EventType.
Add a listener to the control to handle when a specific event occurs.
The added listener is automatically deleted after running once.
Since the object of the added listener is changed, when the listener is deleted
It is an object returned after calling addEventListenerOnce and can be deleted.
var button = new cpr.controls.Button("btn01");
button.addEventListenerOnce("click", function(e) {
// event code...
});
If the current row/column/cell is being selected, deselect it.
If you cancel a selection, it reverts to the previous selection.
checkAllRow()
Set all checkboxes whose columntype is checkbox to check status.
checkAllTreeCheck()
Set all grid tree cell checkboxes to the checked state.
clearAllCheck()
Unchecks all checkboxes whose columntype is a checkbox.
clearAllRowHeight()
Removes any custom row height values applied.
clearAllTreeCheck()
Set all grid tricell checkboxes to unchecked.
clearFilter()
Removes the filter applied to the currently connected data structure.
clearSelection(emitEvent)
Removes all current selections.
Parameters
name
type
description
emitEventoptional
Boolean
defaulttrue
Whether to fire an event (before-selection-change, selection-change).
return
Boolean
clearSort()
Removes sort applied to the currently connected data structure.
collapseAll(deep)
Collapse the entire row group.
If deep is set to false, only row groups of the first depth are collapsed,
Collapses the entire rowgroup if deep is set to true.
Parameters
name
type
description
deepoptional
Boolean
defaulttrue
Whether to fold down to sub-depth rowgroups.
columnVisible(cellIndex, visible, unit)
Change the visible property of a specific cell(column).
All other connected cells or detail and footer on the same column line are also visible.
When moving a column, if there is a hidden column in the area to be moved, it is moved before the column located to the right of the displayed column.
(ex. [0(true), 1(false), 2(true), 3(true)]
If you move column 3 between 0 and 2, move to the front of column 2)
Parameters
name
type
description
cellIndex
Number
Header cell index to change visible property.(or column index)
Whether to continue processing the default action after propagating the event.
dispose()
Removes the objects contained in the control.
expandAll(deep)
Expand the entire row group.
If deep is set to false, only row groups of the first depth are expanded,
Expands the entire rowgroup if deep is set to true.
Parameters
name
type
description
deepoptional
Boolean
defaulttrue
Whether to expand to sub-depth rowgroups.
filter(condition)
Change the filter condition on the currently connected data structure, and filter.
It works the same as the setFilter method.
Parameters
name
type
description
condition
#expression
filter conditional expression.
findAllRow(condition)
Finds the Row that meets the condition and returns the corresponding GridRow array.
Moves focus to the previous control.
If there are multiple structural elements that have focus inside a control, focus may transfer to the previous element.
forEachOfGridCells(func)
The Grid Data is passed to the function that receives the attribute array for each cell in the order shown on the screen in row units (including header, detail, footer, group header, and group footer).
Attribute parameter information for each cell GridCellInfo[] : {
region: GRIDREGION, // Grid region information: header, middle(top ∪ middle ∪ bottom), footer, gheader, gfooter
dsRowIndex: number, // Row index in DataSet
cellIndex: number, // grid design cell index
rowIndex: number, // grid design row index
colIndex: number, // grid design column index
rowSpan: number, // grid design rowSpan
colSpan: number, // grid design colSpan
columnType: string, // normal, rowindex, checkbox
columnName: string, // dataset column name
value: string | number, // dataset value
text: string, // the text displayed on the screen
ctrl: UIControl // UIControl to which data is bound
}
Gets the bounds value of the control relative to the browser's view port.
If the control is not drawn on the screen, an object with all values of 0 is returned.
Gets the bounds value of the control relative to the browser's view port.
If the control is not drawn on the screen, an object with all values of 0 is returned.
Parameters
name
type
description
includeWrap
Boolean
If this value is true, the layout of the parent group gets the area of the node surrounding this control. If false, only get the area of the control node.
Gets the bounds value of the control relative to the browser's view port.
If the control is not drawn on the screen, an object with all values 0 is returned.
\ {columnType: string, columnName: string, suppressible: boolean, suppressRef: string, control: UIControl} Returns null if no cell is found.
getCellText(rowIndex, cellIndex)
Returns the visible value of a specific cell.
Controls that support the "text" property return a text value, and other controls return a value.
If the columnType of a cell is a checkbox, Y or N is returned depending on whether or not it is checked.
Parameters
name
type
description
rowIndex
Number
The row index of the cell whose value you want to retrieve.
cellIndex
Number
Cell index of the cell to get the value.
return
String
Visible value of the cell.
getCellValue(rowIndex, cellIndex)
Returns the value of a specific cell (detail area).
Parameters
name
type
description
rowIndex
Number
The row index of the cell whose value you want to retrieve.
cellIndex
any
The cell index of the cell for which you want to retrieve the value. (Or bound data column name)
return
Object
The value of the corresponding cell.
getCheckRowIndices()
Returns the row index array currently checked.
return
Number[]
The row index array that is currently checked.
getColIndicesByVisible(visible)
Returns colIndex array corresponding to visible information.
Parameters
name
type
description
visible
Boolean
The visible value of the column to be returned.
return
Number[]
colIndex array corresponding to visible information.
getColumnLayout(includeColumnVisible)
Returns grid layout information.
You can set that information through setColumnLayout.
The information fetched is the cell order by cellIndex, the cell size, and the visible information of the cell.
Parameters
name
type
description
includeColumnVisibleoptional
Boolean
defaultfalse
Whether to include visible information of column area in grid layout information.
Deduplicates the value of a specific column in a specific data list and returns it as a json array in the form of label and value.
If there is a control, the displayText of the control will be the label and the actual value will be the value.
You can also return only result values that contain specific text.
Whether to exclude the style set in Grid when exporting. default true.
or export option.
exceptStyle: Whether or not to exclude styles when exporting. default true.
applyFormat : Whether to return the text with Format applied. default true. To export the number data type, the corresponding option must be given as false.
useFormat: Whether to use the format property of the file when exporting to an Excel file (xlsx, xls, etc.). default true.
applySuppress: Whether to reflect cell merging by suppress or mergedToIndexExpr when exporting to Excel. default false.
The rows option is not supported when setting applySuppress.
freezeHeader: Whether to freeze the header area of the grid when exporting to Excel. default false.
reduce: Whether to remove unnecessary data. (ex. {}(empty json object)) default false.
excludeCellIndex : Header cellIndex array to be excluded when exporting. When setting excludeCols, include all cells that are set to visible=false.
excludeColIndex : Array of colIndex to be excluded when exporting. When setting excludeCols, include all cells that are set to visible=false.
rows : A specific row index array to be exported.
rowDataHandler(datas: CellData[], rowIndex: number) : A handler that can change the style or data of each row when exporting to Excel.
rowgroupStyleHandler(cellStyle: utils.CellStyle, region: gridpart.VLOC_REGION, cellIndex: number, columnName: string) : A handler that can change the style or format of each cell when exporting to Excel.
Returns the filter conditional expression set on the currently connected data structure.
return
#expression
filter conditional expression.
getFooterCellValue(cellIndex)
Returns the value of a specific cell (footer area)
Parameters
name
type
description
cellIndex
Number
Cell index of the cell to get the value.
return
Object
The value of the corresponding cell.
getFooterData()
Returns all the data for the footer.
return
String[]
footer area The data array of the cell.
getGridRowGroup(dataRowIndex)
Returns the GridRowGroup object that maps to a row when its rowIndex is a grouped row.
It can be used when TreeCell is arranged in Grid or when using row groups.
If there are multiple row groups, returns the row group closest to the row.
The area being displayed is obtained based on the parent container to which it belongs.
Parameters
name
type
description
includeWrapoptional
Boolean
defaultfalse
If this value is true, the layout of the parent group gets the area of the node surrounding this control. If false, only get the area of the control node.
A RowGroup Band object that meets the applicable grouping conditions.
getRowHeight(rowIndex)
If a user-defined row height is applied, the height of the applied row is returned; otherwise, the row height defined at design time is returned.
User-defined row height is supported only for grids without automatic row height.
Parameters
name
type
description
rowIndex
Number
Index of the row to look up the row height
return
Number[]
getRowState(rowIndex)
Returns the state of a specific row index.
Parameters
name
type
description
rowIndex
Number
The row index for which you want to know the status.
Status of the corresponding ROW index.
State type:
CPR.Data.tabledata.rowstate.UNCHANGED: Unchanged state.
CPR.Data.tabledata.rowstate.Inserted: A new row added.
CPR.Data.tabledata.rowstate.updated: The row is modified.
CPR.Data.tabledata.rowstate.deleted: The row is deleted.
CPR.Data.tabledata.rowstate.Insertdeleted: The row has been added and deleted.
getSelectedCellIndices()
Returns the currently selected cell information as an array.
It only works if the selectionUnit property is "cell".
Array of objects containing row index and cell index information of selected cells.
getSelectedColumnIndices()
Returns the currently selected column index array.
It only works if the selectionUnit property is "column".
return
Number[]
The selected column index array.
getSelectedIndices()
Returns the currently selected information.
Returns number [] if selectionUnit is row or column,
If the selectionUnit is cell, {rowIndex: number, cellIndex: number} [] is returned.
Returns a GridRow object for the currently selected row.
When multiple items are selected, the first GridRow object is returned.
Only works if the selectionUnit property is "row".
One currently selected GridRow object. If no row is selected, null is returned.
getSelectedRowIndex()
Returns the index of the currently selected row.
If multiple items are selected, the first index is returned.
Only works if the selectionUnit property is "row".
return
Number
The index of the currently selected row. If no row is selected, -1 is returned.
getSelectedRowIndices()
Returns the currently selected row index array.
It only works if the selectionUnit property is "row".
return
Number[]
Selected row index array.
getSelectedRows()
Returns a GridRow object of the currently selected rows.
Only works if the selectionUnit property is "row".
Add a column to a specific position on the grid.
The colIndex of the column to be added is written (recommended) based on 0 base, or
It must be written with the colIndex corresponding to the position to be added.
Returns whether the queried property is bindable and the binding has been configured to obtain a valid value.
Even if no binding is configured and a simple value is specified, it is treated as configured so that a valid value is obtained.
For example, binding to a row index that does not exist in the DataSet is an invalid binding.
Sets whether or not to draw all areas up to the invisible area due to scrolling.
true : wholeRenderingMode=true
false : wholeRenderingMode=false, "column"
Change the location of a specific cell.
The header cell (source cell) to be moved or the header cell (target cell) located in the area to be moved
If there are other cells connected by colSpan or rowSpan, all other connected cells move together.
Parameters
name
type
description
sourceHeaderIndex
Number
The header cell index to which you want to move.
targetHeaderIndex
Number
The header cell index located in the area to be moved.
beforeoptional
Boolean
defaulttrue
Whether to move the header located in the moved area before or after.
Scroll to the location of the input cell.
When the grid is grouped, the RowIndex is an index that includes GroupHeader and GroupFooter.
If the argument is an invalid value (rowIndex or cellIndex that does not exist), the scrolling of the corresponding row or cell is not moved.
If the argument is the cell currently displayed on the screen, the scroll does not move.
Do not move when entering cellIndex with visible = false.
Parameters
name
type
description
rowIndex
Number
Row index to move.
cellIndex
Number
The index of the detail cell to move.
isContentRowIndexoptional
Boolean
defaulttrue
Identifies whether the row index targets the entire row including the rowgroup header/footer or the data row (true is all rows, false is data row).
openFilterDialog(headerCellIndex)
Open the filter popup.
The targetColumn of cell index must be set.
The filter pop-up is opened regardless of the filterable value of the cell index.
Removes user-defined attributes for a specific attribute name.
Parameters
name
type
description
key
String
The custom attribute name to remove.
replaceConstraint(child, newConstraint)
Replace the constraints of the control.
Existing constraints are replaced with parameter constraints.
region (grid area) and cellIndex (cell index) cannot be changed.
Constraints to change. (region, cellIndex properties cannot be changed)
return
Boolean
Successful change?
resetGrid()
Initialize the set Grid information.
Data related information is not initialized.
resizeColumn(cellIndex, width)
Change the width of a specific cell.
When resizing columns, the minimum size is 10px. When set to a size smaller than 10px, it is corrected to 10px.
The minimum size criteria is the rendered size, not the design size.
Parameters
name
type
description
cellIndex
Number
The header cell index you want to change.
width
String
The width to change.
revertData()
Recovers all changed data within the grid.
revertRowData(rowIndex)
Recovers data from specific rows that have changed within the grid.
Parameters
name
type
description
rowIndex
Number
Row index
scrollTo(left, top)
If the grid contains scrolling, it will scroll to that position.
Parameters
name
type
description
left
Number
The x-coordinate to scroll. (If set to -1, only the y-coordinate passed to top is set.)
top
Number
The y-coordinate to scroll. (If set to -1, only the x-coordinate passed to left is set.)
select(position, emitEvent)
Select row, column, or cell for the current selectionUnit.
Selection information or array of selection information. Format: {rowIndex: number, cellIndex: number | string}
[]: Initialize selection information.
(Other incorrect value): Selection information is not set.
emitEventoptional
Boolean
defaulttrue
Whether to fire an event (before-selection-change, selection-change).
return
Boolean
selectCells(positions, emitEvent)
Select specific cells.
Previously selected cells are deselected.
It only works if the selectionMulti property is not "none" and the selectionUnit property is "cell".
Array that contains the row index and cell index (or column name) information of the cell to be selected.
[]: Initialize selection information.
(Other incorrect value): Selection information is not set.
emitEventoptional
Boolean
defaulttrue
Whether to fire an event (before-selection-change, selection-change).
return
Boolean
selectColumns(colIndices, emitEvent)
Select specific columns.
Previously selected columns are deselected.
It only works if the selectionMulti property is not "none" and the selectionUnit property is "column".
Parameters
name
type
description
colIndices
Number | Number[] | String | String[]
emitEventoptional
Boolean
defaulttrue
Whether to fire an event (before-selection-change, selection-change).
return
Boolean
selectRadio(rowIndex)
Select columnType=radio for a specific row.
Parameters
name
type
description
rowIndex
Number
The row index to set.
selectRows(rowIndices, emitEvent)
Select specific rows.
Previously selected rows are deselected.
It only works if the selectionMulti property is not "none" and the selectionUnit property is "row".
Parameters
name
type
description
rowIndices
Number | Number[]
Row index or index array to select.
[]: Initialize the selected line.
(Other invalid values): Selection row not set.
emitEventoptional
Boolean
defaulttrue
Whether to fire an event (before-selection-change, selection-change).
return
Boolean
setActivateRowGroup(groupCondition, activate)
Activate or deactivate a specific group.
When activated (deactivated), the group is reconstructed according to the group criteria to be displayed.
Sets whether to enable all checkboxes whose columnType is checkbox.
Set whether to enable or disable all columnType=checkboxes of header and detail.
Parameters
name
type
description
enabled
Boolean
Whether checkbox is enabled
setCheckRowIndex(rowIndex, checked)
Sets the value of the checkbox column for a specific row.
Parameters
name
type
description
rowIndex
Number
The row index to set.
checked
Boolean
The check value to set.
setColumnLayout(layout)
Set grid layout information.
You can set the information obtained through getColumnLayout.
The information to be set is the cell order by cellIndex, the size of the cell, and the visible information of the cell.
The columnLayout to be imported and the grid to be set must match the number of bands and the number of cells in the header, detail, footer, and rowgroup.
Matching method.
The parameters provided are as follows.
label(string): Data displayed in the filter pop-up list.
filterText(string): The text entered into the search input.
columnName(string): (optional) The column name of the current column.
setFooterData(data)
Change all data in the footer area.
Parameters
name
type
description
data
String[]
The data array to change.
setHeaderCheckColumnEnabled(enabled)
Set whether to enable header checkbox column.
Parameters
name
type
description
enabled
Boolean
Whether the checkbox is enabled.
setLeftSplitCellIndex(headerCellIndex)
Set leftSplit through header cellIndex.
leftSplit is automatically updated.
Parameters
name
type
description
headerCellIndex
Number
Header cellIndex to set.
setMaxRowHeight(height)
Set the maximum row height when setting autoRowHeight.
The maximum row height must be smaller than the height of the area (top, middle, bottom) where the row is placed.
Set whether to activate all radios with columnType=radio.
Parameters
name
type
description
enabled
Boolean
Whether radio is enabled
setRightSplitCellIndex(headerCellIndex)
Set rightSplit through header cellIndex.
rightSplit is automatically updated.
Parameters
name
type
description
headerCellIndex
Number
Header cellIndex to set.
setRowHeight(rowIndex, rowHeight)
User-defined row height is supported only for grids without automatic row height.
If the row height to be changed is specified as null, the previously applied value is deleted.
Parameters
name
type
description
rowIndex
Number
Index of row to change height
rowHeight
Number[]
Row height array. If there are multiple grid detail rows, specify the height of each row as an array. (ex. [20], [20, 30])
State value to change.
State type:
CPR.Data.tabledata.rowstate.UNCHANGED: Unchanged state.
CPR.Data.tabledata.rowstate.Inserted: A new row added.
CPR.Data.tabledata.rowstate.updated: The row is modified.
CPR.Data.tabledata.rowstate.deleted: The row is deleted.
CPR.Data.tabledata.rowstate.Insertdeleted: The row has been added and deleted.
setTreeCheckIndex(rowIndex, checked, checkMode)
Check or uncheck the tricell checkbox of a specific row in the grid.
Set whether all rows of the column whose columnType is set are visible.
Supported when the columnType is a checkbox or radio column.
Parameters
name
type
description
columnType
String
The columnType to set visibility to.
visible
Boolean
setWholeRenderingMode(mode)
Set whether to draw all invisible areas outside the scroll viewport.
[true]: Both row and column are drawn to areas that are not visible due to scrolling.
[false]: Areas where rows and columns are not visible due to scrolling are not drawn.
["column"]: Only the column is drawn to the invisible area by scrolling, and the row is not drawn to the invisible area.
Parameters
name
type
description
mode
String | false | true
true|false|"column"
sort(condition)
Change the sort condition on the currently connected data structure and sort it.
Change the Control's Constraints.
Only the items included in Parameter Constraints are changed.
region (grid region) and cellIndex (cell index) cannot be changed.
Specifies custom data. Unlike user-defined attributes, you can use arbitrary types in addition to strings.
When the control is dispose, all custom data is removed.