Editable Data Grid

From Mea Wiki
Revision as of 20:19, 14 February 2018 by Ollvihe (talk | contribs)
Jump to navigation Jump to search


Property Description
selectedRowVariable 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: textbox for storing string values.
  • numericbox: textbox for numeric values.
  • dropdown: list of fixed items that are defined in dropdownoptions property.
  • metricsdate: Date selector that can store Metrics date type of series
  • date: Date selector that can store values using XML date format (e.g. 2018-10-05T16:26:42)
  • checkbox: Checkbox for storing two options. The strings to store are defined in trueValue and falseValue.
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 (only used when type is checkbox)
falseValue attribute value corresponding to checkbox unchecked state (only used when type is checkbox)
allowEditing
format
validationRules
  • required: Requires an element.
  • minlength: Requires the element to be of given minimum length.
  • maxlength: Requires the element to be of given maximum length.
  • range: Requires the element to be in given value range.
  • min: The element requires a given minimum.
  • max: The element requires a given maximum.
  • range: Requires the element to be in a given value range.
  • email: The element requires a valid email.
  • url: The element requires a valid URL
  • digits: The element requires digits only.
  • creditcard: Requires the element to be a credit card number.

Available validation: http://jqueryvalidation.org/documentation/#link-list-of-built-in-validation-methods


{
  "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" })