cpr.controls.provider.GridRow

Hierarchy

Index

Properties
Name Type Description
checked Boolean Returns whether the row is a checked row.
enabled Boolean Returns whether the checkbox for the row is enabled.
expanded Boolean Returns whether the row is expanded.
parent GridRowGroup Returns the parent row group of that row.
rowCheckEnabled Boolean Returns whether the checkbox for the row is enabled.
rowCheckVisible Boolean Returns the visibility of the checkbox for that row.
rowChecked Boolean Returns whether the row is a checked row.
rowRadioEnabled Boolean Returns whether the radiobutton for that row is active.
rowRadioSelected Boolean Returns whether the radio in that row is selected.
rowRadioVisible Boolean Returns whether the row's radiobutton is visible.
Methods
Name Return Type Description
getAttr String Returns the value of a specific property.
getAttrNames String[] Returns the currently set property names.
getAttrs {[attrName:string]: String} Currently set properties key: value Returns an array of types.
getBoolean Boolean Returns the Boolean value of a specific column.
getIndex Number Returns the index of the current row.
getLocalIndex Number Returns the index of the current group row.
getNumber Number Returns the numeric value of a specific column.
getOriginalValue Object Returns the original value of a specific column.
getRowData RowConfigInfo Returns the value of the current row.
getState RowState Returns the state of the current row.
getStateString String Returns the state of the current row in characters.
getString String Returns the character value of a specific column.
getValue Object Returns the value of a specific column.
isFolder Boolean Returns whether this row has child rows.
isLastRow Boolean Returns whether the current row is the last data row.
setAttr Set certain properties.
setRowData Boolean Sets the value of the current row.
setState Changes the state of the current row.
setValue Boolean Changes the value of a specific column.

Constructor

GridRow(grid, row)
Parameters
name type description
grid Grid
row IDataRow

Properties

checked
deprecatedPlease use rowChecked.
type Boolean
readonly
Returns whether the row is a checked row.
(ColumnType = checkbox checked or not.)
enabled
deprecatedPlease use rowCheckEnabled.
type Boolean
readonly
Returns whether the checkbox for the row is enabled.
(It is whether columnType=checkbox is enabled.)
expanded
type Boolean
get
Returns whether the row is expanded. (Only supported by Tricell. Row grouping is not currently supported.)
set
The row sets the expand / close state. (Only supported by Tricell. Row grouping is not currently supported.)
parent
type GridRowGroup
readonly
Returns the parent row group of that row.
It can be used when TreeCell is placed on grid or row group is used.
rowCheckEnabled
type Boolean
readonly
Returns whether the checkbox for the row is enabled.
(It is whether columnType=checkbox is enabled.)
rowCheckVisible
type Boolean
readonly
Returns the visibility of the checkbox for that row.
(Whether columnType=checkbox is visible or not.)
rowChecked
type Boolean
readonly
Returns whether the row is a checked row.
(ColumnType = checkbox checked or not.)
rowRadioEnabled
type Boolean
readonly
Returns whether the radiobutton for that row is active.
(columnType=radio is enabled or not.)
rowRadioSelected
type Boolean
readonly
Returns whether the radio in that row is selected.
(This is whether columnType=radio is selected.)
rowRadioVisible
type Boolean
readonly
Returns whether the row's radiobutton is visible.
(Whether columnType=radio is visible or not.)

Methods

getAttr(attrName)
Returns the value of a specific property.
Parameters
name type description
attrName String Attribute name.
return String Property Value.
getAttrNames()
Returns the currently set property names.
return String[] An array of attribute names as set.
getAttrs()
Currently set properties key: value Returns an array of types.
return {[attrName:string]: String} The properties that are set.
getBoolean(columnName)
Returns the Boolean value of a specific column.
Parameters
name type description
columnName #column Specific column name
return Boolean Boolean value of a specific column.
getIndex()
Returns the index of the current row.
return Number row index.
getLocalIndex()
Returns the index of the current group row. Index within the parent group.
return Number The index of the current group row.
getNumber(columnName)
Returns the numeric value of a specific column.
Parameters
name type description
columnName #column Specific column name
return Number The numeric value of a specific column.
getOriginalValue(columnName)
Returns the original value of a specific column.
Parameters
name type description
columnName #column Specific column name.
return Object The original value of a specific column.
getRowData(columntype)
Returns the value of the current row.
Parameters
name type description
columntypeoptional HeaderType defaultdata.header.HeaderType.ALL
return RowConfigInfo The value of row.
{[columnName: string]: string | number | boolean}
getState()
Returns the state of the current row.
return RowState Current state 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()
Returns the state of the current row in characters.
return String The character state 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)
Returns the character value of a specific column.
Parameters
name type description
columnName #column Specific column name
return String Character-type value of a specific column.
getValue(columnName)
Returns the value of a specific column.
Parameters
name type description
columnName #column Specific column name.
return Object The value of a particular column.
isFolder()
Returns whether this row has child rows.
return Boolean Whether there are child rows.
isLastRow()
Returns whether the current row is the last data row.
return Boolean Whether it is the last row
setAttr(attrName, attrValue)
Set certain properties.
Parameters
name type description
attrName String The specific attribute name.
attrValue String The property value to set.
setRowData(rowData, emitEvent)
Sets the value of the current row.
Parameters
name type description
rowData RowConfigInfo The value of row to set.
emitEventoptional Boolean defaulttrue Whether to trigger an event (before-update, update).
return Boolean Whether the value modification succeeded.
setState(state)
Changes the state of the current row.
Parameters
name type description
state RowState State 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, emitEvent)
Changes the value of a specific column.
Parameters
name type description
columnName #column Specific column name.
value Object The value to change.
emitEventoptional Boolean defaulttrue Whether to trigger an event (before-update, update).
return Boolean Whether the value modification succeeded.