cpr.data.Row

Row. Data Low.
Hierarchy

Index

Methods
Name Return Type Description
getAttr String Sets the specific properties of the current row.
getAttrNames String[] Returns an array of all the attribute names of the current row.
getAttrs {[attrName:string]: String} Returns a json object for all attributes of the current row.
getBoolean Boolean Returns the data corresponding to the input columnName as a Boolean.
getIndex Number Returns the index of the current row.
getNumber Number Returns the data corresponding to the input columnName as a Number.
getOriginalValue Object Returns the source data corresponding to the input columnName.
getRowData RowConfigInfo Returns the row data of the current row in the format {columnName: value}.
getState RowState Returns the state value of the current row.
getStateString String Returns the current row's status value as a character.
getString String Returns the data corresponding to the input columnName as a String.
getValue Object Returns the value corresponding to the input column name.
putValue Boolean The input rowIndex and the data corresponding to columnName change only the value without changing the row state.
setAttr Sets the specific properties of the current row.
setRowData Boolean It takes data in the format {columnName: value} and makes full changes to the data in the current row.
setState Changes the state value of the current row.
setValue Boolean Modify the data corresponding to the input columnName.

Constructor

Row(dataSet, index)
Parameters
name type description
dataSet DataCollection
index Number

Methods

getAttr(attrName)
declaring typeIDataRow
Sets the specific properties of the current row.
Parameters
name type description
attrName String The attribute name to assign
return String
getAttrNames()
declaring typeIDataRow
Returns an array of all the attribute names of the current row.
return String[] An array of all attribute names
getAttrs()
declaring typeIDataRow
Returns a json object for all attributes of the current row.
return {[attrName:string]: String} \ {[attrName: string]: string} json object in key: value format for all attributes
getBoolean(columnName)
declaring typeIDataRow
Returns the data corresponding to the input columnName as a Boolean.
Parameters
name type description
columnName #column The columnName of the column for which to get the value.
return Boolean Boolean type of the data
getIndex()
Returns the index of the current row.
return Number Current row index
getNumber(columnName)
declaring typeIDataRow
Returns the data corresponding to the input columnName as a Number.
If the value is of type String and forced to Number, NaN is returned.
Parameters
name type description
columnName #column The columnName of the column for which to get the value.
return Number Number of the data
getOriginalValue(columnName)
declaring typeIDataRow
Returns the source data corresponding to the input columnName.
Parameters
name type description
columnName #column The columnName of the column for which to get the value.
return Object The data
getRowData(columntype)
Returns the row data of the current row in the format {columnName: value}.
Parameters
name type description
columntypeoptional HeaderType defaultheader.HeaderType.ALL
return RowConfigInfo Row data of the current row (key: columnName, value: json object of the value type).
{[columnName: string]: string | number}
getState()
declaring typeIDataRow
Returns the state value of the current row.
return RowState Current status value of ROW.
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.
getStateString(isAbbreviation)
declaring typeIDataRow
Returns the current row's status value as a character.
Parameters
name type description
isAbbreviationoptional Boolean defaulttrue Whether to express an axial form.
return String The status value character of the current row.
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"
getString(columnName)
declaring typeIDataRow
Returns the data corresponding to the input columnName as a String.
Parameters
name type description
columnName #column The columnName of the column for which to get the value.
return String String of this data
getValue(columnName)
Returns the value corresponding to the input column name.
Parameters
name type description
columnName String The columnName of the column for which to get the value.
return Object The data
putValue(columnName, value)
declaring typeIDataRow
The input rowIndex and the data corresponding to columnName change only the value without changing the row state.
Parameters
name type description
columnName #column The columnName of the column to modify
value Object Value to modify
return Boolean Successful value modification
setAttr(attrName, attrValue)
declaring typeIDataRow
Sets the specific properties of the current row.
Parameters
name type description
attrName String The attribute name to assign
attrValue String The attribute value to assign
setRowData(rowData)
It takes data in the format {columnName: value} and makes full changes to the data in the current row.
Parameters
name type description
rowData RowConfigInfo Format of row data to be modified {columnName: value, ...}.
{[columnName: string]: string | number}
return Boolean
setState(state)
Changes the state value of the current row.
Parameters
name type description
state RowState Values ​​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.
setValue(columnName, value)
Modify the data corresponding to the input columnName.
Parameters
name type description
columnName String The columnName of the column to modify
value Object
return Boolean Successful value modification