Difference between revisions of "Editable Data Grid"

From Mea Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
+
'''Editable Data Grid''' is a table, that shows data from QPR Suite, and the data can be edited. 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, but not QPR ProcessDesigner or QPR EnterpriceArchitect.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 6: Line 6:
 
|-
 
|-
 
||selectedRowVariable
 
||selectedRowVariable
||Context variable where currently selected row's object id of stored.
+
||Local context variable where currently selected row's object id of stored.
 
|-
 
|-
 
||query
 
||query
Line 34: Line 34:
 
||type
 
||type
 
||
 
||
* '''textbox''': textbox for storing string values.
+
* '''textbox''': shows a textbox for storing string values.
* '''numericbox''': textbox for numeric values.
+
* '''numericbox''': shows a textbox for numeric values. It's not possible to input textual data.
* '''dropdown''': list of fixed items that are defined in '''dropdownoptions''' property.
+
* '''dropdown''': shows a dropdown list where user can select from a list of predefined items. The items are defined in the '''dropdownoptions''' property.
* '''metricsdate''': Date selector that can store Metrics date type of series
+
* '''metricsdate''': shows a date selector that can store dates to Metrics date type of series.
* '''date''': Date selector that can store values using XML date format (e.g. 2018-10-05T16:26:42)
+
* '''date''': shows a date selector that can store values using XML date format (e.g. 2018-10-05T16:26:42). Other date type of data than the Metrics date series, use the XML date format.
* '''checkbox''': Checkbox for storing two options. The strings to store are defined in '''trueValue''' and '''falseValue'''.
+
* '''checkbox''': shows a checkbox, which is used for storing two possible values. The possible values are defined in '''trueValue''' and '''falseValue''' properties.
 
|-
 
|-
 
||dropdownoptions
 
||dropdownoptions
Line 45: Line 45:
 
|-
 
|-
 
||trueValue
 
||trueValue
||attribute value corresponding to checkbox checked state (only used when '''type''' is checkbox)
+
||Attribute value corresponding to checkbox checked state of a checkbox. Used only used when '''type''' is checkbox.
 
|-
 
|-
 
||falseValue
 
||falseValue
||attribute value corresponding to checkbox unchecked state (only used when '''type''' is checkbox)
+
||Attribute value corresponding to checkbox unchecked state. Used only used when '''type''' is checkbox.
 
|-
 
|-
 
||allowEditing
 
||allowEditing
Line 58: Line 58:
 
||validationRules
 
||validationRules
 
||
 
||
* '''required''': Requires an element.  
+
* '''required''' (boolean): Requires an element.
* '''minlength''': Requires the element to be of given minimum length.  
+
* '''minlength''' (integer): Requires the element to be of given minimum length.
* '''maxlength''': Requires the element to be of given maximum length.  
+
* '''maxlength''' (integer): Requires the element to be of given maximum length.
* '''range''': Requires the element to be in given value range.  
+
* '''range''' (two integers): Requires the element to be in given value range.
* '''min''': The element requires a given minimum.  
+
* '''min''' (integer): The element requires a given minimum.
* '''max''': The element requires a given maximum.
+
* '''max''' (integer): The element requires a given maximum.
* '''range''': Requires the element to be in a given value range.  
+
* '''email''' (boolean): The element requires a valid email.
* '''email''': The element requires a valid email.  
+
* '''url''' (boolean): The element requires a valid URL.
* '''url''': The element requires a valid URL  
+
* '''digits''' (boolean): The element requires digits only.
* '''digits''': The element requires digits only.
 
* '''creditcard''': Requires the element to be a credit card number.  
 
  
Example: validationRules: { required: true, minlength: 3 }
+
Examples:
 +
<pre>
 +
validationRules: { required: true, minlength: 3 }
 +
</pre>
  
 +
<pre>
 +
validationRules: { range: [0, 100] }
 +
</pre>
 
|-
 
|-
 
|}
 
|}
 
|-
 
|-
 
|}
 
|}
 
Available validation: http://jqueryvalidation.org/documentation/#link-list-of-built-in-validation-methods
 
 
  
 
<pre>
 
<pre>

Revision as of 20:35, 14 February 2018

Editable Data Grid is a table, that shows data from QPR Suite, and the data can be edited. 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, but not QPR ProcessDesigner or QPR EnterpriceArchitect.

Property Description
selectedRowVariable Local context variable where currently selected row's object id of stored.
query Query parameter for the QPR Suite Web Service query to get the rows to the data grid.
sortby Sorting parameter for the QPR Suite Web Service query to get the rows to the data grid.
queryoptions Options parameter for the QPR Suite Web Service query to get the rows to the data grid.
columns Array of objects where each represent a column in the editable data grid.
Property Description
attribute QPR Suite Web Service attribute name.
attributeParameters Parameters for the attribute.
headerText Column header text that is visible to users.
type
  • textbox: shows a textbox for storing string values.
  • numericbox: shows a textbox for numeric values. It's not possible to input textual data.
  • dropdown: shows a dropdown list where user can select from a list of predefined items. The items are defined in the dropdownoptions property.
  • metricsdate: shows a date selector that can store dates to Metrics date type of series.
  • date: shows a date selector that can store values using XML date format (e.g. 2018-10-05T16:26:42). Other date type of data than the Metrics date series, use the XML date format.
  • checkbox: shows a checkbox, which is used for storing two possible values. The possible values are defined in trueValue and falseValue properties.
dropdownoptions Options for the dropdown menu (object array with properties label [user visible text] and value [text to store to MEA]). Only used when dropdown is checkbox.
trueValue Attribute value corresponding to checkbox checked state of a checkbox. Used only used when type is checkbox.
falseValue Attribute value corresponding to checkbox unchecked state. Used only used when type is checkbox.
allowEditing
format
validationRules
  • required (boolean): Requires an element.
  • minlength (integer): Requires the element to be of given minimum length.
  • maxlength (integer): Requires the element to be of given maximum length.
  • range (two integers): Requires the element to be in given value range.
  • min (integer): The element requires a given minimum.
  • max (integer): The element requires a given maximum.
  • email (boolean): The element requires a valid email.
  • url (boolean): The element requires a valid URL.
  • digits (boolean): The element requires digits only.

Examples:

validationRules: { required: true, minlength: 3 }
validationRules: { range: [0, 100] }
{
  "editSettings": {
    "allowAdding": true,
    "allowDeleting": true,
    "allowEditing": true,
    "allowEditing": "normal"
  },
  "toolbarSettings": {
    "showToolbar": true,
    "toolbarItems": ["add", "edit", "delete", "update", "cancel"]
  }                             
}
{
  "columns": [
    { allowEditing: false },
  ]                             
}

Batch editing is not supported by the editable data grid (editSettings: { allowEditing: "batch" })