Editable Data Grid
Editable Data Grid is a table, that shows data from QPR Suite and the data can also be edited. The Editable Data Grid uses QPR Suite Web Service to query and save data, and thus QPR Suite Web Service properties define which kind of data can be edited. Mainly QPR Metrics, QPR Portal action forms and QPR Suite user management data can be edited, where as QPR ProcessDesigner or QPR EnterpriceArchitect cannot be edited.
Data shown in the data grid is fetched using QPR Suite Web Service query, where each row is linked to one QPR Suite object, and each column is linked to one attribute in the QPR Suite Web Service. Note that the editable data grid does not use datasets to fetch data.
Editable data grid is configured using JSON settings field that is available in the Data grid settings in the Presentation tab. The following table shows all available settings. See configuration examples below the table.
Property | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
additionalAttributes | List of attributes and values that are saved to the object when it's created. Can be used to define a fixed parent object id for all created objects. Defined as a JSON object where the property name is the attribute name, and property value is the attribute value.
Example: "additionalAttributes": { "attribute1": "value1", "attribute2": "value2" } | ||||||||||||||||||||||||||||||||||
selectedRowVariable | Local context variable where currently selected row's object id of stored. Note that the selected row doesn't change, when the context variable is changed from somewhere else. | ||||||||||||||||||||||||||||||||||
query | Query parameter for the QPR Suite Web Service query to get the rows to the editable data grid. More information: http://kb.qpr.com/qpr2017-1/index.html?queryobjects.htm. | ||||||||||||||||||||||||||||||||||
sortBy | Sorting parameter for the QPR Suite Web Service query to get the rows to the editable data grid. | ||||||||||||||||||||||||||||||||||
queryOptions | Options parameter for the QPR Suite Web Service query to get the rows to the editable data grid. | ||||||||||||||||||||||||||||||||||
parentAttribute | (Will be supported in QPR UI 2018.3) Attribute name that is used as parent object when creating new objects to QPR Suite. The referenced parent attribute must exist either in the defined columns or in the additionalAttributes. The first case is better when user needs to select the parent from multiple options, and the latter is better when there is a fixed parent for all the created objects. | ||||||||||||||||||||||||||||||||||
createObjectOptions | (Will be supported in QPR UI 2018.3) Options parameter for the QPR Suite Web Service CreateObject operation (http://kb.qpr.com/qpr2017-1/index.html?createobject2.htm), that is used when a new row is created that is not based on a template object. | ||||||||||||||||||||||||||||||||||
createCopyOptions | (Will be supported in QPR UI 2018.3) Options parameter for the QPR Suite Web Service CreateCopy operation (http://kb.qpr.com/qpr2017-1/index.html?createcopy3.htm), that is used when a new row is created based on a template object. | ||||||||||||||||||||||||||||||||||
deleteObjectOptions | (Will be supported in QPR UI 2018.3) Options parameter for the QPR Suite Web Service DeleteObjects operation (http://kb.qpr.com/qpr2017-1/index.html?deleteobject2.htm), that is used when a row is deleted from the data grid. | ||||||||||||||||||||||||||||||||||
setAttributeOptions | (Will be supported in QPR UI 2018.3) Options parameter for the QPR Suite Web Service SetAttribute operation (http://kb.qpr.com/qpr2017-1/index.html?setattribute.htm), that is used when an attribute value is set. | ||||||||||||||||||||||||||||||||||
columns | Array of objects where each represent a column in the editable data grid. Following properties can be used:
| ||||||||||||||||||||||||||||||||||
[other syncfusion settings] |
All Syncfusion datagrid settings can be used: https://help.syncfusion.com/api/js/ejgrid#members:columns |
Configuration examples
Example 1: List all scorecards in the Metrics environment. Scorecard names, identifiers and descriptions can be edited.
{ "query": "[SC].models.scorecard", "sortBy": "name", "selectedRowVariable": "selectedScorecardId", "columns": [ {"attribute": "name", "headerText": "Scorecard name", "inputType": "textbox", "allowEditing": true}, {"attribute": "symbol", "headerText": "Scorecard identifier", "inputType": "textbox", "allowEditing": true}, {"attribute": "description", "headerText": "Scorecard description", "inputType": "textbox", "allowEditing": true} ] }
Example 2: List of measures in a single scorecard. The scorecard id must be available in the myScorecard variable.
{ "query": "[<#myScorecard>].measures", "sortBy": "name", "selectedRowVariable": "selectedMeasureId", "columns": [ {"attribute": "name", "headerText": "Measure name", "inputType": "textbox", "allowEditing": true}, {"attribute": "Numeric value", attributeParameters="series=\"SERIES1\"", "headerText": "Measure value", "inputType": "numericbox", "allowEditing": true}, {"attribute": "measure.value", attributeParameters="series=\"SERIES2\"", "headerText": "Date date", "inputType": "date", "allowEditing": true"}, {"attribute": "measure.value", attributeParameters="series=\"SERIES3\"", "headerText": "Checkbox value", "inputType": "checkbox", "trueValue": "10", "falseValue": "0", "allowEditing": true"}, {"attribute": "measure.value", attributeParameters="series=\"SERIES4\"", "headerText": "Dropdown value", "inputType": "dropdown", "dropdownOptions": [{"label": "Good", "value": "10"},{"label": "Fair", "value": "5"},{"label": "Bad", "value": "0"}], "allowEditing": true"} ] }
Example 3: (Will be supported in QPR UI 2018.3) The following settings can be used to control, whether there are adding, deleting and editing functions available:
{ "editSettings": { "allowAdding": true, "allowDeleting": true, "allowEditing": true }, "toolbarSettings": { "showToolbar": true, "toolbarItems": ["add", "edit", "delete", "update", "cancel"] } }
Note that the batch editing is not supported by the editable data grid ("editSettings": { "editMode" : "batch" })