cpr.data.Column

Column. Data column.

Index

Methods
Name Return Type Description
getBoolean Boolean Returns the data corresponding to the input rowIndex as a Boolean type.
getColumnData Array Returns the data of the current column in array form.
getHeader Header Returns the Header object of the current Column.
getName String Returns the column name of the current column.
getNumber Number Returns the data corresponding to the input rowIndex as a Number.
getOriginalValue Object Returns the source data corresponding to the input rowIndex.
getString String Returns the data corresponding to the input rowIndex as a String.
getUserAttrNames String[] Returns all custom attribute names.
getValue Object Returns the data corresponding to the input rowIndex.
putValue Boolean The data corresponding to the input rowIndex is changed without changing the row state, only the value.
removeAllUserAttr Delete all custom attributes.
removeUserAttr Removes user-defined attributes for a specific attribute name.
setValue Boolean Modify the data corresponding to the input rowIndex.
userAttr Specifies custom properties.

Constructor

Column(dataSet, name)
Parameters
name type description
dataSet DataCollection
name String

Methods

getBoolean(rowIndex)
Returns the data corresponding to the input rowIndex as a Boolean type.
Parameters
name type description
rowIndex Number The row index of the row from which to retrieve the value
return Boolean Boolean type of the data
getColumnData()
Returns the data of the current column in array form.
return Array An array of all the data in the current column
getHeader()
Returns the Header object of the current Column.
return Header Header object of current column
getName()
Returns the column name of the current column.
return String Current column name
getNumber(rowIndex)
Returns the data corresponding to the input rowIndex as a Number.
If the value is of type String and forced to Number, NaN is returned.
Parameters
name type description
rowIndex Number The row index of the row from which to retrieve the value
return Number Number of the data
getOriginalValue(rowIndex)
Returns the source data corresponding to the input rowIndex.
Parameters
name type description
rowIndex Number The row index of the row from which to retrieve the value
return Object The data
getString(rowIndex)
Returns the data corresponding to the input rowIndex as a String.
Parameters
name type description
rowIndex Number The row index of the row from which to retrieve the value
return String String of this data
getUserAttrNames()
Returns all custom attribute names.
return String[] An array of all custom attribute names.
getValue(rowIndex)
Returns the data corresponding to the input rowIndex.
Parameters
name type description
rowIndex Number The row index of the row from which to retrieve the value
return Object The data
putValue(rowIndex, value)
The data corresponding to the input rowIndex is changed without changing the row state, only the value.
Parameters
name type description
rowIndex Number Row index of the row to be modified
value Object Value to modify
return Boolean Successful value modification
removeAllUserAttr()
Delete all custom attributes.
removeUserAttr(key)
Removes user-defined attributes for a specific attribute name.
Parameters
name type description
key String The custom attribute name to remove.
setValue(rowIndex, value)
Modify the data corresponding to the input rowIndex.
Parameters
name type description
rowIndex Number Row index of the row to be modified
value Object Value to modify
return Boolean Successful value modification
userAttr(key, value)
Specifies custom properties.
Parameters
name type description
key String The attribute name to assign
value String The attribute value to specify.
userAttr(key)
Returns a user-defined property.
Parameters
name type description
key String The attribute name to get.
return String Custom properties.
userAttr(values)
Specify multiple custom properties at once.
Parameters
name type description
values {[key:string]: String} A JSON object containing custom attribute keys/values.
userAttr()
Get all custom properties in the form of a map.
return {[key:string]: String}