Editable Data Grid

From Mea Wiki
Revision as of 19:54, 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. 2017-10-05T16:26:42)
  • checkbox: checkbox
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

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