cpr.data.DataCollection
Index
Name |
Type |
Description |
disposed |
Boolean |
Returns whether the control should be removed. |
id |
String |
Returns the ID of the control. |
type |
ControlType |
Returns the signature string of the Control's unique Type that can distinguish the Control. |
uuid |
String |
Returns the unique ID of the control. |
Name |
Return Type |
Description |
addColumn |
Boolean |
Add Column. |
addDisplayColumn |
Boolean |
Add Display Column |
addEventListener |
|
Add listeners by EventType to the control. |
addEventListenerOnce |
(e: cpr.events.CEvent)=>Void |
Add a listener to the control that will run only once per EventType. |
addRow |
IDataRow |
Add a new row at the end. |
addRowData |
IDataRow |
Enter rowData and add a new row at the end. |
bind |
IBindFactory |
Bind that property. |
bindParentRow |
|
Bind the line of the parent dataset. |
bindParentRowId |
|
Bind it with the line ID of the parent dataset. |
build |
Number |
|
changeRowIndex |
|
Replace the position of two rows. |
clear |
|
|
clearData |
|
Remove all rows in the dataset. |
clearFilter |
|
Remove the filtering condition. |
clearSort |
|
Remove the sort condition. |
commit |
|
Allows you to remember the changed state of the current view in its original state. |
copyToDataMap |
Boolean |
Copies data from the current dataset to the target datamap. |
copyToDataSet |
Boolean |
Copy data from the current dataset to the target dataset |
deleteColumn |
Boolean |
Delete the Column. |
deleteRow |
Boolean |
Get the row index and remove the row. |
dispatchEvent |
Boolean |
Forwards specific events. |
dispose |
|
Removes the objects contained in the control. |
findAllRow |
IDataRow[] |
Returns an array of all the Row objects in the specified range that satisfy the condition. |
findAllRowBoundlessly |
IDataRow[] |
Among all data rows ignoring bindParentRow and filter, rows that match the condition are returned as an array of cpr.data.DataRow objects. |
findAllRowExpr |
IDataRow[] |
Returns an array of all the Row objects in the specified range that satisfy the condition. |
findAllRowExprBoundlessly |
IDataRow[] |
Among all data rows ignoring bindParentRow and filter, rows that match the condition are returned as an array of cpr.data.DataRow objects. |
findFirstRow |
IDataRow |
Returns the first Row object in the specified range that meets the condition. |
findFirstRowBoundlessly |
IDataRow |
Returns the first cpr.data.DataRow object that matches the condition among all data rows ignoring bindParentRow and filter. |
findFirstRowExpr |
IDataRow |
Returns the first Row object in the specified range that meets the condition. |
findFirstRowExprBoundlessly |
IDataRow |
Returns the first cpr.data.DataRow object that matches the condition among all data rows ignoring bindParentRow and filter. |
findParentRow |
IDataRow |
Returns the line of the parent dataset corresponding to the input line ID. |
findParentRowBoundlessly |
IDataRow |
BindparRENTROW and all data rows that ignore bindparRENTROW and Filters return CPR.Data.datarow objects with a matching row ID. |
findUnfilteredFirstRow |
IDataRow |
Returns the first cpr.data.DataRow object that matches the condition regardless of the filter. |
findUnfilteredFirstRowExpr |
IDataRow |
Returns the first cpr.data.DataRow object that matches the condition regardless of the filter. |
forEachOfUnfilteredRows |
|
Process data row by row for the entire data. |
getAppInstance |
AppInstance |
Returns the app instance to which the control belongs. |
getAvg |
DecimalType |
Returns the average of the data in the input column name. |
getBindContext |
BindContext |
Returns the bind context. |
getBindInfo |
BindInfo |
Returns the bind property information for the control. |
getBindedParentRowId |
String |
Returns the row ID of the linked parent dataset. |
getBoolean |
Boolean |
Returns the Boolean data corresponding to the input rowIndex and columnName. |
getColumn |
Column |
Returns the Column object for that column name. |
getColumnCount |
Number |
Returns the number of columns. |
getColumnData |
Array |
Returns the data of the column corresponding to the input columnName as an array type. |
getColumnNames |
String[] |
Returns the column name in array format. |
getConditionalAvg |
DecimalType |
Returns the average of the data in the input column name of the row that satisfies the condition. |
getConditionalAvgExpr |
DecimalType |
Returns the average of the data of the column names received among the rows that meet the conditions. |
getConditionalMax |
Object |
Returns the maximum value of the column name data among the rows that meet the conditions. |
getConditionalMaxExpr |
Object |
Returns the maximum value of the column name data among the rows that meet the conditions. |
getConditionalMin |
Object |
Returns the minimum value of the column name data among the rows that meet the conditions. |
getConditionalMinExpr |
Object |
Returns the minimum value of the column name data among the rows that meet the conditions. |
getConditionalRowCount |
Number |
Returns the number of rows that match the condition. |
getConditionalRowCountExpr |
Number |
Returns the number of rows that match the condition. |
getConditionalSum |
DecimalType |
Returns the sum of the column name data among the rows that meet the conditions. |
getConditionalSumExpr |
DecimalType |
Returns the sum of the data of the input column name of the row that satisfies the condition. |
getFilter |
#expression |
Returns the currently filtered condition. |
getFilterExpr |
Expression |
Returns the currently filtered condition. |
getHeader |
Header |
Returns the Header object through the column name. |
getHeaders |
Header[] |
Returns the headers of the corresponding HeaderType as an array. |
getMax |
Object |
Returns the maximum value among the data of the input column name. |
getMin |
Object |
Returns the minimum value among the data of the input column name. |
getNumber |
Number |
Returns the data corresponding to the input rowIndex and columnName as a Number. |
getOriginalAvg |
DecimalType |
Returns the average of the source data of the column names entered. |
getOriginalMax |
Object |
Returns the maximum value of the original data of the column name received. |
getOriginalMin |
Object |
Returns the minimum value of the original data of the column name received. |
getOriginalRowCount |
Number |
Returns the number of rows in the source data. |
getOriginalSum |
DecimalType |
Returns the sum of the source data of the input column name. |
getOriginalValue |
Object |
Returns the original data corresponding to the input rowindex and columnName. |
getRow |
IDataRow |
Returns the Row object at the row index. |
getRowCount |
Number |
Returns the current number of rows. |
getRowCountByState |
{[key:number]: Number} |
Returns the number of rows with the corresponding status value by state. |
getRowData |
RowConfigInfo |
Returns the row data of the input row index in the format {columnName: value}. |
getRowDataRanged |
RowConfigInfo[] |
Returns an array of row data corresponding to the input range. |
getRowDatasByState |
{[key:number]: cpr.data.RowConfigInfo[]} |
Returns an array of row data with the corresponding status values. |
getRowIndicesByState |
{[key:number]: Number[]} |
Search the row with the corresponding status value and use the status value as the key value
Returns a json object whose value is the row index array. |
getRowState |
RowState |
View the status values of a specific row |
getRowStateString |
String |
Returns the state value of a specific row as a string type. |
getRowStatedCount |
Number |
Returns the number of rows with the corresponding status value. |
getRowStatedIndex |
Number |
Retrieves the row with the corresponding status value and returns the row index. |
getRowStatedIndices |
Number[] |
Retrieves a row with the corresponding status value and returns an array of row indices. |
getRowsAttr |
String[] |
Returns an array of the attribute values of the attribute name in all rows. |
getSort |
#expression |
Returns the current sorting condition. |
getSortExpr |
Expression |
Returns the current sorting condition. |
getString |
String |
Returns the data corresponding to the input rowIndex and columnName as a String. |
getSum |
DecimalType |
Returns the sum of the data of the input column name. |
getUnfilteredDistinctValues |
Array |
Returns an array of non-overlapping values of a specific column in the entire data. |
getUnfilteredRowCount |
Number |
Returns the number of rows corresponding to a specific filter value in the entire data. |
getUnfilteredRowDatas |
RowConfigInfo[] |
Returns an array of row data corresponding to a specific filter value in the entire data. |
getUnfilteredRowDatasByState |
{[key:number]: cpr.data.RowConfigInfo[]} |
Returns an array of row data with the corresponding status value from the entire data. |
getUserAttrNames |
String[] |
Returns all custom attribute names. |
getValue |
Object |
Returns the data corresponding to the input Rowindex and ColumnName. |
insertRow |
IDataRow |
Add a new row before or after the desired row index. |
insertRowData |
IDataRow |
Enter rowData and add a new row before or after the desired row index. |
isAvailableBinding |
Boolean |
Returns whether the queried property is bindable and the binding has been configured to obtain a valid value. |
isBindable |
Boolean |
Make sure it is a bindable property. |
isDisplayColumn |
Boolean |
Returns whether this column name is Display Column. |
isExistColumn |
Boolean |
Returns whether this column name exists. |
isModified |
Boolean |
Returns whether the dataset has changed |
moveRowIndex |
|
Converts the row at sourceIndex to targetIndex. |
parseData |
|
|
pushRow |
IDataRow |
Add a new row at the end. |
pushRowData |
IDataRow |
Enter rowData and add a new row at the end. |
pushRowSilently |
IDataRow |
At the end, a new row connected to the parent dataset is added with the data. |
putValue |
Boolean |
Change the value of the input rowIndex and columnName to only the value without changing the row state. |
realDeleteRow |
Boolean |
Enter the row index and completely remove the row. |
refresh |
|
Reconstruct view data based on source data |
removeAllEventListeners |
|
Removes all event listeners for the control. |
removeAllUserAttr |
|
Delete all custom attributes. |
removeEventListener |
|
Remove Listener for each EventType in the control. |
removeEventListeners |
|
Remove all EventType listeners from the control. |
removeUserAttr |
|
Removes user-defined attributes for a specific attribute name. |
resetCondition |
|
The sort and filter applied to the dataset will be initialized. |
revert |
|
Revert to last commit state |
revertRow |
|
Only the data at a specific row index is rounded. |
setFilter |
|
Filter view data by specifying filtering criteria |
setFilterExpr |
|
Filter view data by specifying filtering criteria |
setRowState |
|
Changes the state value of a specific row. |
setRowStateAll |
|
Change the status value of the entire row to the input status value. |
setRowStateRanged |
|
Changes the status value of the input row range to the input status value. |
setRowsAttr |
|
Batch modifies the attribute values of the attribute names in all rows. |
setSort |
|
Sort the view data by specifying the sort condition. |
setSortExpr |
|
Sort the view data by specifying the sort condition. |
setUnfilteredRowStateAll |
|
Change the status value of all data to the received status value. |
setValue |
Boolean |
Correct the data corresponding to the received rowIndex and columnName. |
unbind |
|
Unbind that property. |
updateRow |
Boolean |
It takes data in the format {columnName: value} and makes a complete change to the data in a particular row. |
userAttr |
|
Specifies custom properties. |
userData |
|
Specifies custom data. |
userattr |
Object |
Returns a user-defined property. |
Properties
declaring type
|
Control |
type
|
Boolean |
readonly
|
Returns whether the control should be removed.
|
declaring type
|
Control |
type
|
String |
readonly
|
Returns the ID of the control.
|
declaring type
|
Control |
type
|
ControlType |
readonly
|
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
|
declaring type
|
Control |
type
|
String |
readonly
|
Returns the unique ID of the control.
|
Methods
Add Column.
UPDATED event occurs when a value is added to a column added with addColumn. b>
name |
type |
description |
column
|
Header |
The Header object to add. |
return
|
Boolean |
Whether the column was successfully added. |
Add Display Column
Header information is added, and if there is data, corresponding column data is also added to row data.
Columns added with addDisplayColumn will not change the row state or UPDATED event when modifying the value. b>
Column that does not participate in Row state change and is not transmitted as request data even in submission communication. u>
name |
type |
description |
column
|
Header |
The Header object to add. |
return
|
Boolean |
Whether the column was successfully added. |
Add listeners by EventType to the control.
Add a listener to the control to handle when a specific event occurs.
var button = new cpr.controls.Button("btn01");
button.addEventListener("click", function(e) {
// event code...
});
name |
type |
description |
type
|
String |
Event type. |
listener
|
(e: cpr.events.CEvent)=>Void |
Event listeners. |
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...
});
name |
type |
description |
type
|
String |
Event type. |
listener
|
(e: cpr.events.CEvent)=>Void |
Event listeners. |
return
|
(e: cpr.events.CEvent)=>Void |
The modified Listener object. |
Add a new row at the end.
An INSERTED event occurs. b>
return
|
IDataRow |
The new Row object you added. |
Enter rowData and add a new row at the end.
An INSERTED event occurs. b>
name |
type |
description |
rowData
|
RowConfigInfo |
Row data to add. (json data with key: header name, value: value)
{[columnName: string]: string | number} |
return
|
IDataRow |
The new Row object you added. |
Bind that property.
name |
type |
description |
propertyName
|
#bindable-property_name |
The attribute name to bind. |
Bind the line of the parent dataset.
name |
type |
description |
row
|
IDataRow |
Row of parent dataset. |
Bind it with the line ID of the parent dataset.
name |
type |
description |
rowId
|
String |
ID of the parent dataset row. |
Replace the position of two rows.
name |
type |
description |
sourceIndex
|
Number |
row The first row index to be repositioned. |
targetIndex
|
Number |
row The second row index to be repositioned. |
name |
type |
description |
alloptional
|
Boolean |
|
Remove all rows in the dataset.
name |
type |
description |
emitEventoptional
|
Boolean |
Whether clear event occurs after data is removed. (default: true) |
Remove the filtering condition.
Remove the sort condition.
Allows you to remember the changed state of the current view in its original state.
1. Only changes to the Row state are made,
The row index changed by sort / filter is not saved.
2. Display Column is not updated as original.
3. Change status
UNCHANGED: No change.
INSERTED, UPDATED: Change current value to Row with UNCHANGED state as original value
DELETED, INSERTDELETED: Deleted from source data.
Copies data from the current dataset to the target datamap.
Only the data in the existing columns of the target dataset is copied.
name |
type |
description |
targetDataMap
|
DataMap |
The target data map into which the copy data will be placed. |
rowIndex
|
Number |
The row index to copy. |
Copy data from the current dataset to the target dataset
Only the data in the existing columns of the target dataset is copied.
The data added during copying is INSERT state.
name |
type |
description |
targetDataSet
|
DataCollection |
The target dataset into which the copy data will reside. |
filterConditionoptional
|
#expression |
The condition to filter when copying. (Full copy when omitted) |
Delete the Column. (Including Display column)
name |
type |
description |
columnName
|
#column |
The name of the column to delete. |
return
|
Boolean |
Whether the column was successfully deleted. |
Get the row index and remove the row.
DELETED event is fired. b>
name |
type |
description |
rowIndex
|
Number |
The row index to be deleted. |
return
|
Boolean |
Successful deletion of rows. |
Forwards specific events.
name |
type |
description |
e
|
CEvent |
event |
return
|
Boolean |
Successful event delivery. |
Removes the objects contained in the control.
Returns an array of all the Row objects in the specified range that satisfy the condition.
※ We look by reference. (Search based on the current data)
name |
type |
description |
condition
|
#expression |
search requirement. |
startIndexoptional
|
Number |
Range start row index. |
endIndexoptional
|
Number |
Range end row index. |
return
|
IDataRow[] |
An array of Row objects that match the search criteria. |
Among all data rows ignoring bindParentRow and filter, rows that match the condition are returned as an array of cpr.data.DataRow objects.
The returned cpr.data.DataRow object may return an invalid RowIndex if the row is hidden.
name |
type |
description |
condition
|
#expression |
Search condition expression. |
Returns an array of all the Row objects in the specified range that satisfy the condition.
※ We look by reference. (Search based on the current data)
name |
type |
description |
condition
|
Expression |
search requirement. |
startIndexoptional
|
Number |
Range start row index. |
endIndexoptional
|
Number |
Range end row index. |
return
|
IDataRow[] |
An array of Row objects that match the search criteria. |
Among all data rows ignoring bindParentRow and filter, rows that match the condition are returned as an array of cpr.data.DataRow objects.
The returned cpr.data.DataRow object may return an invalid RowIndex if the row is hidden.
name |
type |
description |
condition
|
Expression |
Search condition cpr.expression.Expression. |
Returns the first Row object in the specified range that meets the condition.
※ Search by reference. (Search based on the current data)
name |
type |
description |
condition
|
#expression |
search requirement. |
startIndexoptional
|
Number |
Range start row index. |
endIndexoptional
|
Number |
Range end row index. |
return
|
IDataRow |
The Row object of the first row that satisfies the search condition. |
Returns the first cpr.data.DataRow object that matches the condition among all data rows ignoring bindParentRow and filter.
The returned cpr.data.DataRow object may return an invalid RowIndex if it is a hidden row.
name |
type |
description |
condition
|
#expression |
Search condition expression. |
Returns the first Row object in the specified range that meets the condition.
※ Search by reference. (Search based on the current data)
name |
type |
description |
condition
|
Expression |
search requirement. |
startIndexoptional
|
Number |
Range start row index. |
endIndexoptional
|
Number |
Range end row index. |
return
|
IDataRow |
The Row object of the first row that satisfies the search condition. |
Returns the first cpr.data.DataRow object that matches the condition among all data rows ignoring bindParentRow and filter.
The returned cpr.data.DataRow object may return an invalid RowIndex if it is a hidden row.
name |
type |
description |
condition
|
Expression |
Search condition cpr.expression.Expression. |
Returns the line of the parent dataset corresponding to the input line ID.
This method returns the correct value only if the parent row ID is bound with 'BindparRENTROWID'.
name |
type |
description |
rowID
|
String |
Row ID. |
return
|
IDataRow |
Row object that matches the row ID |
BindparRENTROW and all data rows that ignore bindparRENTROW and Filters return CPR.Data.datarow objects with a matching row ID.
The returned CPR.DATA.DATAROW object can return rowindex that is not valid for hidden rows.
Getbindedparentrowid functions of Dataset/DataView binded by the bindparRENTROW function.
name |
type |
description |
rowID
|
String |
The rowID of the row you want to retrieve. |
Returns the first cpr.data.DataRow object that matches the condition regardless of the filter.
The returned cpr.data.DataRow object may return an invalid RowIndex if it is a hidden row.
name |
type |
description |
condition
|
#expression |
Search condition expression. |
Returns the first cpr.data.DataRow object that matches the condition regardless of the filter.
The returned cpr.data.DataRow object may return an invalid RowIndex if it is a hidden row.
name |
type |
description |
condition
|
Expression |
Search condition cpr.expression.Expression. |
Process data row by row for the entire data.
(Total data means all data that has not been filtered.)
name |
type |
description |
processFnc
|
(dataRow: cpr.data.IDataRow)=>Void |
(dataRow: DataRow) => void type function |
Returns the app instance to which the control belongs.
return
|
AppInstance |
The app instance the control belongs to. |
Returns the average of the data in the input column name.
It should only be used when the value of the corresponding column name is of type Number.
name |
type |
description |
columnName
|
#column |
The column name for which you want to find the average. |
return
|
DecimalType |
The average of the values in that column name. |
Returns the bind context.
Returns the bind property information for the control.
name |
type |
description |
propertyName
|
#bindable-property_name |
The name of the attribute being bound. |
Returns the row ID of the linked parent dataset.
return
|
String |
Row ID of the parent dataset. |
Returns the Boolean data corresponding to the input rowIndex and columnName.
name |
type |
description |
rowIndex
|
Number |
The row index of the row from which to retrieve the value. |
columnName
|
#column |
The columnName of the column for which to get the value. |
return
|
Boolean |
The Boolean type of the data. |
Returns the Column object for that column name.
name |
type |
description |
name
|
#column |
Column name. |
return
|
Column |
The Column object for the corresponding column. |
Returns the number of columns.
return
|
Number |
Number of columns. |
Returns the data of the column corresponding to the input columnName as an array type.
name |
type |
description |
columnName
|
#column |
The columnName of the column for which to get the value. |
return
|
Array |
An array of all the data in the columnName. |
Returns the column name in array format.
name |
type |
description |
columntypeoptional
|
HeaderType |
|
return
|
String[] |
An array of column names. |
Returns the average of the data in the input column name of the row that satisfies the condition.
It should only be used if the value of the corresponding column name is a Number.
※ In the view base row, search for the row that satisfies the condition.
name |
type |
description |
condition
|
#expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression to average. |
return
|
DecimalType |
The average of the data of the column name input among the rows that meet the condition. |
Returns the average of the data of the column names received among the rows that meet the conditions.
It should be used only when the value of the column name is of type Number.
※ Search rows matching the criteria in the row based on the view.
name |
type |
description |
condition
|
Expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression to average. |
return
|
DecimalType |
The average of the data of the column name input among the rows that meet the condition. |
Returns the maximum value of the column name data among the rows that meet the conditions.
※ Search rows matching the criteria in the row based on the view.
name |
type |
description |
condition
|
#expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression for which you want to find the maximum value. |
return
|
Object |
The maximum value of the data of the input column among the rows that satisfy the condition. |
Returns the maximum value of the column name data among the rows that meet the conditions.
※ Search rows matching the criteria in the row based on the view.
name |
type |
description |
condition
|
Expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression for which you want to find the maximum value. |
return
|
Object |
The maximum value of the data of the input column among the rows that satisfy the condition. |
Returns the minimum value of the column name data among the rows that meet the conditions.
※ Search rows matching the criteria in the row based on the view.
name |
type |
description |
condition
|
#expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression for which you want to find the minimum value. |
return
|
Object |
The minimum value among the data of the input column name of the row that satisfies the condition. |
Returns the minimum value of the column name data among the rows that meet the conditions.
※ Search rows matching the criteria in the row based on the view.
name |
type |
description |
condition
|
Expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression for which you want to find the minimum value. |
return
|
Object |
The minimum value among the data of the input column name of the row that satisfies the condition. |
Returns the number of rows that match the condition.
※ In the view base row, search for the row that satisfies the condition.
name |
type |
description |
condition
|
#expression |
Filtering conditions. |
return
|
Number |
Number of rows matching the condition. |
Returns the number of rows that match the condition.
※ In the view base row, search for the row that satisfies the condition.
name |
type |
description |
condition
|
Expression |
Filtering conditions. |
return
|
Number |
Number of rows matching the condition. |
Returns the sum of the column name data among the rows that meet the conditions.
It should be used only when the value of the column name is of type Number.
※ Search rows matching the criteria in the row based on the view.
name |
type |
description |
condition
|
#expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression for which you want to sum. |
return
|
DecimalType |
Sum of data of input column name of Row matching condition. |
Returns the sum of the data of the input column name of the row that satisfies the condition.
It should only be used if the value of the corresponding column name is a Number.
※ In the view base row, search for the row that satisfies the condition.
name |
type |
description |
condition
|
Expression |
Filtering conditions. |
columnName
|
#column |
Column name or expression for which you want to sum. |
return
|
DecimalType |
Sum of data of input column name of Row matching condition. |
Returns the currently filtered condition.
return
|
#expression |
The currently filtered expression condition. |
Returns the currently filtered condition.
return
|
Expression |
The currently filtered expression condition. |
Returns the Header object through the column name.
name |
type |
description |
columnName
|
#column |
Column name. |
return
|
Header |
The Header object for the column name. |
Returns the headers of the corresponding HeaderType as an array.
name |
type |
description |
columntypeoptional
|
HeaderType |
|
return
|
Header[] |
Header array of the corresponding HeaderType. |
Returns the maximum value among the data of the input column name.
The comparison standard follows the dataType of the corresponding column.
name |
type |
description |
columnName
|
#column |
The column name for which you want to get the maximum value. |
return
|
Object |
The maximum value in the column. |
Returns the minimum value among the data of the input column name.
The comparison standard follows the dataType of the corresponding column.
name |
type |
description |
columnName
|
#column |
The column name for which you want to get the minimum value. |
return
|
Object |
The smallest of the column name values. |
Returns the data corresponding to the input rowIndex and columnName as a Number.
If the value is of type string and forced to Number, NaN is returned.
name |
type |
description |
rowIndex
|
Number |
The row index of the row from which to retrieve the value. |
columnName
|
#column |
The columnName of the column for which to get the value. |
return
|
Number |
The Number type of the data. |
Returns the average of the source data of the column names entered.
It should only be used when the value of the corresponding column name is of type Number.
name |
type |
description |
columnName
|
#column |
The column name for which you want to find the average. |
return
|
DecimalType |
The average of the original values of the column names. |
Returns the maximum value of the original data of the column name received.
name |
type |
description |
columnName
|
#column |
The column name for which you want to get the maximum value. |
return
|
Object |
The maximum value of the original value of this column. |
Returns the minimum value of the original data of the column name received.
name |
type |
description |
columnName
|
#column |
The column name for which you want to get the minimum value. |
return
|
Object |
The minimum value among the original values of the column names. |
Returns the number of rows in the source data.
The number of rows is returned except for the INSERTED state and the INSERTDELETED state.
return
|
Number |
Number of rows of source data. |
Returns the sum of the source data of the input column name.
It should only be used when the value of the corresponding column name is of type Number.
name |
type |
description |
columnName
|
#column |
The column name for which you want to sum. |
return
|
DecimalType |
The sum of the original values of the column names. |
Returns the original data corresponding to the input rowindex and columnName.
When entering the incorrect ROW index or columnName, it returns null.
If there is no data from the input rowindex and columnName, it returns an empty string ("" ").
If the column data type is expression, it returns the execution execution results.
name |
type |
description |
rowIndex
|
Number |
The row index of the row from which to retrieve the value. |
columnName
|
#column |
The columnName of the column for which to get the value. |
return
|
Object |
The corresponding source data. |
Returns the Row object at the row index.
name |
type |
description |
index
|
Number |
row index. |
return
|
IDataRow |
The Row object at the index. |
Returns the current number of rows.
return
|
Number |
Number of rows. |
Returns the number of rows with the corresponding status value by state.
name |
type |
description |
state
|
RowState |
Search status value.
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. |
return
|
{[key:number]: Number} |
The number of rows of the status value. |
Returns the row data of the input row index in the format {columnName: value}.
name |
type |
description |
rowIndex
|
Number |
The row index of the row from which to retrieve the value. |
columntypeoptional
|
HeaderType |
|
return
|
RowConfigInfo |
The row data of the corresponding row index. (key: columnName, value: json object of the corresponding value) |
Returns an array of row data corresponding to the input range.
The array is a json object array and is of type {columnName: value}.
name |
type |
description |
startIndexoptional
|
Number |
row The starting row index of the range to fetch data from. |
endIndexoptional
|
Number |
end of range to fetch row data row index. |
Returns an array of row data with the corresponding status values.
name |
type |
description |
state
|
RowState |
Search status value.
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. |
columntypeoptional
|
HeaderType |
|
return
|
{[key:number]: cpr.data.RowConfigInfo[]} |
The row data array of the corresponding state value. |
Search the row with the corresponding status value and use the status value as the key value
Returns a json object whose value is the row index array.
name |
type |
description |
state
|
RowState |
Search status value.
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. |
return
|
{[key:number]: Number[]} |
A json object with the status value as the key value and the corresponding row index array as the value value. |
View the status values of a specific row
Returns null if the Row's Index is out of range.
name |
type |
description |
rowIndex
|
Number |
Row Index to query status values. |
return
|
RowState |
If you cannot find ROW, return NULL and return one of the following values.
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. |
Returns the state value of a specific row as a string type.
name |
type |
description |
rowIndex
|
Number |
Row Index to query status values. |
return
|
String |
If the Row can not be found, it returns null; otherwise, it returns one of the following values:
Unchanged state: "UC", "UNCHANGED"
New row added: "I", "INSERTED"
Rows modified: "U", "UPDATED"
Deleted rows: "D", "DELETED"
The row was added and deleted: "ID", "INSERTDELETED" |
Returns the number of rows with the corresponding status value.
name |
type |
description |
state
|
RowState |
Search status value.
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. |
return
|
Number |
The number of rows of the status value. |
Retrieves the row with the corresponding status value and returns the row index.
name |
type |
description |
state
|
RowState |
Search status value.
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. |
return
|
Number |
row index. (Returns -1 if there is no row for that state.) |
Retrieves a row with the corresponding status value and returns an array of row indices.
name |
type |
description |
state
|
RowState |
Search status value.
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. |
return
|
Number[] |
row index array |
Returns an array of the attribute values of the attribute name in all rows.
name |
type |
description |
attrName
|
String |
Attribute name. |
return
|
String[] |
An array of the corresponding attribute values for all rows. |
Returns the current sorting condition.
return
|
#expression |
The currently sorted expression condition. |
Returns the current sorting condition.
return
|
Expression |
The currently sorted expression condition. |
Returns the data corresponding to the input rowIndex and columnName as a String.
name |
type |
description |
rowIndex
|
Number |
The row index of the row from which to retrieve the value. |
columnName
|
#column |
The columnName of the column for which to get the value. |
return
|
String |
The String type of the data. |
Returns the sum of the data of the input column name.
It should only be used when the value of the corresponding column name is of type Number.
name |
type |
description |
columnName
|
#column |
The column name for which you want to sum. |
Returns an array of non-overlapping values of a specific column in the entire data.
You can use it by adding the filtering function you want.
(Total data means all data that has not been filtered.)
ex) Value of column a: 'a1', 'a2', 'a1', 'a3', 'a4', 'a3'
getUnfilteredDistinctValues ('a')
=> ['a1', 'a2', 'a3', 'a4']
name |
type |
description |
columnName
|
#column |
Column name to get the value. |
filterFncoptional
|
(dataRow: cpr.data.IDataRow)=>Boolean |
Function to filter. |
sortConditionoptional
|
String |
|
return
|
Array |
Array of non-redundant values for the column. |
Returns the number of rows corresponding to a specific filter value in the entire data.
(Total data means all data that has not been filtered.)
name |
type |
description |
filterFncoptional
|
(dataRow: cpr.data.IDataRow)=>Boolean |
Function to filter. |
return
|
Number |
Number of rows corresponding to the filter value. |
Returns an array of row data corresponding to a specific filter value in the entire data.
(Total data means all data that has not been filtered.)
name |
type |
description |
filterFncoptional
|
(dataRow: cpr.data.IDataRow)=>Boolean |
Function to filter. |
columntypeoptional
|
HeaderType |
|
return
|
RowConfigInfo[] |
Array of row data corresponding to the filter value. |
Returns an array of row data with the corresponding status value from the entire data.
(Total data means all data that has not been filtered.)
name |
type |
description |
state
|
RowState |
Search status value.
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. |
columntypeoptional
|
HeaderType |
|
return
|
{[key:number]: cpr.data.RowConfigInfo[]} |
Row data array of the corresponding state value in all data.
|
Returns all custom attribute names.
return
|
String[] |
An array of all custom attribute names. |
Returns the data corresponding to the input Rowindex and ColumnName.
name |
type |
description |
rowIndex
|
Number |
The row index of the row from which to retrieve the value. |
columnName
|
#column |
The columnName of the column for which to get the value. |
return
|
Object |
Data corresponding to the input rowindex and columnName
The return type is determined according to the header datatype.
In the case of decimal type, it is returned to CPR.FOUNDATION.DECIMIMALYPE .
To get the actual value from the decimal object, you must use tonumber () or toString () .
For Expression Type, we return the execution results.
If you have the desired data type, you must create an expression so that the execution results are returned to that type.
If the input rowindex is NULL IllegalargumentException
If the input rowindex is a value that does not exist within the range of row range, returns null .
If there is a column of the input columnName, it returns the value .
If there is no column of the input columnName, it returns null .
If there is no value in the column of the input columnName, it returns a "(empty string) . |
Add a new row before or after the desired row index.
An INSERTED event occurs. b>
name |
type |
description |
index
|
Number |
The row index you want to insert. |
afteroptional
|
Boolean |
Whether to insert after the corresponding row index.
true(default) : after the base line.
false : Before the base line. |
return
|
IDataRow |
The new Row object you added. |
Enter rowData and add a new row before or after the desired row index.
An INSERTED event occurs. b>
name |
type |
description |
index
|
Number |
The row index you want to insert. |
afteroptional
|
Boolean |
Whether to insert after the row index. (true: back / false: forward) |
rowDataoptional
|
RowConfigInfo |
The row data to add. (key: header name, json data with value: value) |
return
|
IDataRow |
The new Row object you 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.
name |
type |
description |
propertyName
|
#bindable-property_name |
Property name to check whether binding is valid. |
Make sure it is a bindable property.
name |
type |
description |
propertyName
|
#bindable-property_name |
Attribute name |
return
|
Boolean |
Confirmation. |
Returns whether this column name is Display Column.
name |
type |
description |
columnName
|
#column |
The name of the column to search. |
return
|
Boolean |
Whether the column name is Display Column. |
Returns whether this column name exists.
name |
type |
description |
columnName
|
#column |
The name of the column to search. |
return
|
Boolean |
Whether the column name exists. |
Returns whether the dataset has changed
(whether there is a row in the inserted, deleted, or updated state)
return
|
Boolean |
No change. |
Converts the row at sourceIndex to targetIndex.
If targetIndex is greater than sourceIndex, the actual converted index is converted to targetIndex - 1.
name |
type |
description |
sourceIndex
|
Number |
row The row index to replace. |
targetIndex
|
Number |
row The row index to be repositioned. |
afteroptional
|
Boolean |
Whether to go back the row index. (true: back / false: forward) |
Add a new row at the end.
The added row is added in the UNCHANGED state, not in the INSERTED state. b>
INSERTED event does not fire. b>
return
|
IDataRow |
The new Row object you added. |
Enter rowData and add a new row at the end.
Added rows will be added as UNCHANGED states instead of INSERTED states. b>
No INSERTED event occurs. b>
name |
type |
description |
rowData
|
RowConfigInfo |
Row data to add. (json data with key: header name, value: value)
{[columnName: string]: string | number} |
return
|
IDataRow |
The new Row object you added. |
At the end, a new row connected to the parent dataset is added with the data.
The added row will be added in UNCHANGED status instead of INSERTED status.
INSERTED event does not fire.
name |
type |
description |
rowDataoptional
|
RowConfigInfo |
Row data to be added. (key: header name, json data with value: value)
|
parentRowoptional
|
IDataRow |
The row or row ID of the parent dataset. |
Change the value of the input rowIndex and columnName to only the value without changing the row state.
Row state changes do not occur and no corresponding events occur. b>
name |
type |
description |
rowIndex
|
Number |
The row index of the row to be modified. |
columnName
|
#column |
The columnName of the column to modify. |
value
|
Object |
The value to modify. |
return
|
Boolean |
Whether the value modification succeeded. |
Enter the row index and completely remove the row.
The original row is removed, so the previous state is not remembered.
name |
type |
description |
rowIndex
|
Number |
The row index to be deleted. |
return
|
Boolean |
Successful deletion of rows. |
Reconstruct view data based on source data
filter, sort will not be removed. u>
※ You can not keep the existing order.
Rebuild the viewTable based on the data in the dataTable.
sort, filter applied
Removes all event listeners for the control.
Delete all custom attributes.
Remove Listener for each EventType in the control.
control.removeEventListener ('click', listener); code> pre>
name |
type |
description |
type
|
String |
Event type. |
listener
|
(e: cpr.events.CEvent)=>Void |
Event listeners. |
Remove all EventType listeners from the control.
control.removeEventListeners ('click'); code> pre>
name |
type |
description |
type
|
String |
Event type. |
Removes user-defined attributes for a specific attribute name.
name |
type |
description |
key
|
String |
The custom attribute name to remove. |
The sort and filter applied to the dataset will be initialized.
Revert to last commit state
If there is no last commit, it returns to the initial state.
1. Only changes to the Row state are made,
The row index changed by sort / filter is not saved.
2. Display Column does not revert to original value
3. Change status
UNCHANGED: No change.
INSERTED, INSERTDELETED: Deleted from source data.
UPDATED, DELETED: Changed raw value to original value and changed to UNCHANGED Row.
Only the data at a specific row index is rounded.
name |
type |
description |
rowIndex
|
Number |
Row index |
Filter view data by specifying filtering criteria
Existing filtering conditions are removed.
name |
type |
description |
condition
|
#expression |
Filtering conditions. |
Filter view data by specifying filtering criteria
Existing filtering conditions are removed.
name |
type |
description |
condition
|
Expression |
Filtering conditions. |
Changes the state value of a specific row.
name |
type |
description |
rowIndex
|
Number |
The row index to change the state value. |
state
|
RowState |
Status 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. |
Change the status value of the entire row to the input status value.
name |
type |
description |
state
|
RowState |
Status 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. |
Changes the status value of the input row range to the input status value.
name |
type |
description |
state
|
RowState |
Status 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. |
startIndex
|
Number |
|
endIndex
|
Number |
End row index. |
Batch modifies the attribute values of the attribute names in all rows.
name |
type |
description |
attrName
|
String |
Attribute name. |
attrValue
|
String |
The property value to change. |
Sort the view data by specifying the sort condition.
Existing sort conditions are removed.
name |
type |
description |
condition
|
#expression |
Sort condition. |
Sort the view data by specifying the sort condition.
Existing sort conditions are removed.
name |
type |
description |
condition
|
Expression |
Sort condition. |
Change the status value of all data to the received status value.
(Total data means all data that has not been filtered.)
name |
type |
description |
state
|
RowState |
Status 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. |
Correct the data corresponding to the received rowIndex and columnName.
1. Change of state
When the column corresponding to the columnName is not a DisplayColumn and the row state is UNCHANGED
Row status changes to UPDATED. (UNCHANGED-> UPDATED)
Rows that are DELETED or INSERTED cannot be modified.
2. Event
UPDATED event is fired when it is modified. B>
name |
type |
description |
rowIndex
|
Number |
The row index of the row to be modified. |
columnName
|
#column |
The columnName of the column to modify. |
value
|
Object |
The value to modify. |
return
|
Boolean |
Whether the value modification succeeded. |
Unbind that property.
name |
type |
description |
propertyName
|
#bindable-property_name |
Attribute name to unbind. |
It takes data in the format {columnName: value} and makes a complete change to the data in a particular row.
If columnData does not contain rowData, the existing value is retained.
name |
type |
description |
rowIndex
|
Number |
The row index of the row to be modified. |
rowData
|
RowConfigInfo |
Format of row data to be modified {columnName: value, ...}.
{[columnName: string]: string | number} |
return
|
Boolean |
Whether the value modification succeeded. |
Specifies custom properties.
name |
type |
description |
key
|
String |
The attribute name to assign |
value
|
String |
The attribute value to specify. |
Returns a user-defined property.
name |
type |
description |
key
|
String |
The attribute name to get. |
return
|
String |
Custom properties. |
Specify multiple custom properties at once.
name |
type |
description |
values
|
{[key:string]: String} |
A JSON object containing custom attribute keys/values. |
Get all custom properties in the form of a map.
return
|
{[key:string]: String} |
|
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.
name |
type |
description |
key
|
String |
The key of the data to be specified. |
value
|
Object |
Data to specify. |
get custom data
name |
type |
description |
key
|
String |
The key of the data to get. |
Specifies multiple user-defined data.
name |
type |
description |
override
|
{[key:string]: Object} |
A JSON object containing user-defined data. |
Get all your custom data.
return
|
{[key:string]: Object} |
|
Returns a user-defined property.
return
|
Object |
Custom properties. |