Data grid component
Use the Data grid component to add and edit table data.
View the example of a configuration object that adds table data below.
{
"type": "crt.DataGrid",
"features": {
"editable": {
"enable": true
},
"rows": {
"toolbar": true
}
},
"rowTitle": "\$Account",
"columns": [
{
"code": "Name",
"width": 200,
"sticky": true,
"cellView": {
"type": "crt.ViewField",
"value": "\$Name",
"maxLines": 3,
"label": {
"visible": false
}
},
"readonly": true
},
{
"code": "CreatedOn"
},
{
"code": "DoNotUseEmail"
},
{
"code": "Age"
}
],
"sorting": [
{
"columnCode": "Name",
"direction": "asc"
}
],
verticalScroll: true
}
string type
Component type. crt.DataGrid for the Data grid component.
string features
Additional component features.
Parameters
Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
object editable | Manages the editing of data. Name Description boolean enable The flag that determines whether to edit component data. By default, true The component data is editable. false The component data is not editable. | ||||||||
object rows | Additional features of component rows. Name Description boolean toolbar The flag that determines whether to display available actions. By default, true Available actions are displayed. false Available actions are not displayed. |
string rowTitle
Pre-configured and non-editable column name. When you set the rowTitle property, Mobile Creatio ignores the sticky property value.
array of objects columns
Array of columns to load.
Parameters
Name | Description | ||||
|---|---|---|---|---|---|
number id | Unique column identifier. If you omit a value, Mobile Creatio uses the | ||||
string code | Column name. | ||||
string caption | Column caption. If you omit a value, Mobile Creatio receives the | ||||
number dataValueType | Column data type. | ||||
number width | Column width. If you omit a value, Mobile Creatio uses out-of-the-box column width (120px). | ||||
boolean hidden | The flag that determines whether to hide a column. By default, true A column is hidden. false A column is shown. | ||||
boolean sticky | The flag that determines whether to freeze a column. By default, true A column is frozen. false A column is not frozen. | ||||
boolean readonly | The flag that sets the column to read-only. By default, true The column is editable. false The column is not editable. | ||||
object cellView | Parameters that determine conditions to view and edit column. List of parameters depends on column type. |
array of objects sorting
Sort component data.
Parameters
Name | Description | ||||||
|---|---|---|---|---|---|---|---|
string columnCode | Column name. | ||||||
string direction | The sorting order. asc Ascending. desc Descending. none The sorting order is not defined. |
boolean verticalScroll
The flag that determines whether to scroll component data. By default, false.
Available values
true | Scrolling is enabled. |
false | Scrolling is disabled. |