Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Data Grid

  • Last UpdatedJun 25, 2024
  • 14 minute read

Use Data Grid control to display data in tabular form from a data source in your form.

Properties

The properties for the control are grouped under the following tabs:

Basic

Property

Description

Name

Name that identifies the control. This value is also used for the label of the control.

XML Node

XML node mapped to the control. Use this value to map a list to a form and a form to a workflow.

  • Prefix with @ to use the value of the control as an attribute with the immediate parent node. For example, @FirstName.

  • Use / for a parent-child node configuration to uniquely identify a control in a form with multiple containers. For example, Employee/FirstName.

    The default value is the value for the Name property without the spaces.

Note:
- If you use / to denote a parent which is not a container and the parent is at the same level as that of the child, then the XML node for the control is not generated.
- If you edit this value later, then it might affect the mapping between forms, lists, and workflows.

Description

Description for the control.

Tooltip

Message that appears when the pointer hovers over the control.

Configuration Name

Specifies grid view configuration.

To specify grid view configuration

  1. Click the Configuration Name button. The Grid View Configuration page appears.

  2. In the Grid Configuration dropdown list, select the required grid configuration. The data grid preview with columns and their values appears. The Parameters list is also displayed if there are any parameters associated with the grid configuration. In the Parameters list, click and select a control on the form, if applicable.

    On the data grid column, you can perform the following actions:

    • Sorting single or multiple columns

      • Sort column values in Ascending order

      • Sort column values in Descending order

    • Resizing columns

  3. Click Save & Continue. The selected name is set for the control and the Configuration Name page is closed.

    Note:
    - For Parameters, the Title of the control on the form is displayed, if set for the control. Otherwise, the XML Node of the control on the form is displayed.
    - In forms designer, when you try to parameterize on a hierarchical grid, only the root level columns are listed.
    - In the Grid View Configuration page, resizing the last data grid column to a smaller size is not supported due to Third Party Control limitations.
    - Ensure that you map a Number control to an Integer or Numeric type of Data Grid parameter.

Appearance

Property

Description

Visible

Show or hide the control.

  • Select Yes to show the control.

  • Select No to hide the control.

    The default value is Yes.

Read-Only

Allow or deny a user to enter a value for the control.

  • Select Yes to deny a user to enter a value for the control.

  • Select No to allow a user to enter a value for the control.

    The default value is No.

Label Position

Position of the label for the control.

  • Select Default to allow the system to align the label. The system aligns the label to the left of the control or as specified by the container control.

  • Select Left to align the label to the left of the control.

  • Select Top to align the label to the top of the control.

  • Select Right to align the label to the right of the control.

  • Select Bottom to align the label to the bottom of the control.

  • Select Suppress to hide the label for the control.

    The default value is Suppress.

Note:
- If the value is Default and the control is placed on a container control, then the value of the Label Position property of the container control determines the position of the label for the control.
- For example, if the value is Default and the control is placed on a Base Form with Label Position property set to Top, then the label is aligned to the top of the control.

Label-Control Area

Area occupied by the label and the control in percentage.

  • Select Default to allow the system to set the label and the control areas.

  • Select Custom to specify the label area. The control area is automatically set based on the label area.

    The default value is Default.

Note:
- If the value is Default and the control is placed on a container control, then the value of the Label-Control Area property of the container control determines the area of the label for the control.
- This is applicable only when the Label Position is set to Left or Right.

Width

Width in pixels for the control.

The default value is 0.

Note: If the value is 0, then the width of the control is set as per the default values.

Height

Height in pixels for the control.

The default value is 0.

Note: If the value is 0, then the height of the control is set as per the default values.

Consider Available Height

Resize the height of the control or container based on the available height.

  • Select Yes to resize the height based on available height.

  • Select No to retain the space.

    The default value is No.

Note:
- The Consider Available Height property is not applicable for the following:
-Designer view
-Print form
-Panel form with horizontal tab order
- If this property is set to Yes and a value is specified in the Height property, minimum height is considered.
- This property is applicable only in web view.
- When more than one control or container is set with Consider Available Height at the same level of container or form, then the available space is distributed evenly between those controls or containers.
For example, consider a Form which contains two Panel forms with Consider Available Height set to Yes, where Panel form 1 has two TextInput controls and Panel form 2 has one TextInput control. The Panel form 1’s height is more than Panel form 2’s height as Panel form 1 contains two TextInput controls and the available empty space in the form is evenly distributed between the two Panel forms.

Rearrange Columns

Allow or deny a user to reorder the columns by dragging the header cells.

  • Select Yes to allow a user to reorder the columns.

  • Select No to deny a user to reorder the columns.

    The default value is No.

Note:
At the runtime, the reordering of the columns is not persistent.

In hierarchical grid, the column reordering of the child grid, at runtime, is not persistent during the following conditions:
-Pagination
-Grid Refresh
-In mobile view

Resize Columns

Allow or deny a user to resize the columns by dragging the edges of the header cells.

  • Select Yes to allow a user to resize the columns..

  • Select No to deny a user to resize the columns.

    The default value is No.

Retain Space

Reserve or remove space when the control is hidden.

  • Select Yes to keep space when the control is hidden.

  • Select No to remove space when the control is hidden.

    The default value is No.

Multiple Selection

Allow or deny a user to select multiple records for the control.

  • Select Yes to allow a user to select multiple records for the control.

  • Select No to deny a user to select multiple records for the control.

    The default value is Yes.

    For information on behavior of the data grids on data change with the Multiple Selection property, see Multiple and Parametrized Data Grids.

Show Export Button

Show or hide the export button for the control.

  • Select Yes to show the export button for the control.

  • Select No to hide the export button for the control.

    The default value is No.

Note:
- The export button is available at every level in a hierarchical grid
- You cannot export all levels at same time.
- If you select No to hide the export button,then the footer with paging buttons is visible only if the data of the grid is greater than the page size. This is applicable at every level.
- If you select Yes to show the export button, then the footer is visible even if the data of the grid is lesser than or equal to the page size.

Export Type

File type of exported data for the control.

  • Select All to show both Excel document and Portable document export buttons for the control to export data to an Excel document or a Portable document respectively.

  • Select Excel to show the Excel document export button for the control to export data to an Excel document.

  • Select PDF to show the Portable document export button for the control to export data to a Portable document.

    The default value is All.

Note:
- PDF saves only the screenshots for the current page of the control.

- When you export a Data Grid with large data as a pdf, the browser crashes. To avoid this issue, in the Scripts tab of the Forms container, set the script for the On Form Load property as follows:

$.getScript("js/pako_deflate.min.js");

This enables compression in the pdf, and it is required if your dataset is very large.

Export All Pages

Allow or deny a user to export all pages for the control.

  • Select Yes to allow a user to export all pages for the control.

  • Select No to deny a user to export all pages for the control. However, the system allows the user to export only the current page for the control.

    The default value is No.

Adapt UI

Change the user interface of the control based on the display width.

  • Select Yes to allow the system to change the user interface of the control based on the display width. The Web View is rendered for the control when the screen width is greater than or equal to 800 pixels. Otherwise, the Mobile View is rendered for the control.

  • Select No to deny the system to change the user interface of the control based on the display width. In this case, the Web View is rendered for the control.

    The default value is Yes.

Note: The responsiveness of the container depends on the value set for the Desktop View Only property at the Form level.

Validation

Property

Description

Mandatory

Enforce or bypass entering a value for the control.

  • Select Yes to enforce entering a value for the control.

  • Select No to bypass entering a value for the control.

    The default value is No.

Advanced

Property

Description

On Data Bound

Run a script when data is bound to the control.

For more information, see scripting guidelines for On Data Bound property.

On Data Change

Run a script when value of the control changes.

Note: In a data grid, if the persist column is of bit type, then the On Data Change event does not trigger as expected.

For more information, see scripting guidelines for On Data Change property.

On Selection Change

Run a script when selection of the record changes.

For more information, see scripting guidelines for On Selection Change property.

ID

Reference identification code for the control. This value is automatically generated and cannot be changed.

Behavior

Show or hide data for the control.

  • Select Data Grid to show data for the control.

  • Select Data Source to hide data for the control.

    The default value is Data Grid.

    For information on using Data Grid values in other controls, see Using Data Grid Values in Options script.

    For more information on using a using data from a data grid set as a data source, see Use Data from Data Grid Set As Data Source.

Execution Mode

Allow or deny a user to retrieve data for server calls immediately.

  • Select Asynchronous to deny a user to retrieve data for server calls immediately.

  • Select Synchronous to allow a user to retrieve data for server calls immediately.

    The default value is Asynchronous.

Note: In a hierarchical grid,this property is applicable only at the root level. The child levels are always in the Asynchronous mode.

Dynamic Page Size

Display records per page based on the available height.

  • Select Yes to display records per page based on available height.

  • Select No to display all the records.

    The default value is No.

Note:
- This property is not applicable to Print
-If Dynamic Page Size property is set to Yes, then the value set for the Page Size property is considered as the minimum value.
- The row height is fixed with Dynamic Page Size set to Yes.
-The Data Grid with Execution Mode property set to Synchronous is not supported with Dynamic Page Size property set to Yes.

Page Size

Number of records added at run-time for the control.

By default, the page size is set to greater than 1.

Extended Information

Allow or deny a user to access the extended information (that is columns other than the display and value columns of the result set) based on the selection for the control.

  • Select Yes to allow a user to access the extended information based on the selection for the control.

  • Select No to deny a user to access the extended information based on the selection for the control.

    The default value is No.

Select First Record

Allow or deny the system to automatically select the first record when the control is loaded.

  • Select Yes to allow the system to automatically select the first record when the control is loaded.

  • Select No to deny the system to automatically select the first record when the control is loaded.

    The default value is No.

Note:
- In the Data Grid control, the Select First Record property takes precedence over the script to select a record in the On Data Bound event.
- For example, in a Data Grid control when the Select First Record property is set to Yes and a script in the On Data Bound event is set to select the second record, the first record is selected
- Therefore, control.selectRecord() method and the Select First Record property must not be used together.
- In a hierarchical grid, if the Allow Selection property is applied at the child level, then the parent record expands automatically and the child record is selected.

Auto-Select Record

Allow or deny the system to automatically select the record when the check box is selected and vice versa.

  • Select Yes to allow the system to automatically select the record when the check box is selected and vice versa.

  • Select No to deny the system to automatically select the record when the check box is selected and vice versa.

    The default value is No.

Note:
- If the Multiple Selection property is set to Yes and the check box for the record is previously selected, then selecting the record does not clear the check box.
- In such cases, select the check box for the record to clear the check box for the record.

Summary Columns

Columns to view in the summary of a Base Form.

Note:
- When the Extended Information property is set to Yes, any column can be specified. Otherwise, only the Display columns and the Value columns can be specified. Multiple values must be separated with a comma.
- In a hierarchical grid, this property is applicable only for the root level columns.

Auto-load Grid

Allow or deny the system to automatically load the control.

  • Select On Form Load and Parameter Change to allow the system to automatically load the control when the form is loaded and when the parameter is changed.

  • Select On Form Load to allow the system to automatically load the control only when the form is loaded.

  • Select Never to deny the system to automatically load the control when the form is loaded and when the parameter is changed.

    The default value is On Form Load and Parameter Change.

Note:
- For non-parameterized data grids, setting the value to On Form Load and Parameter Change is the same as setting the value to On Form Load.
- Use the control.refreshGrid() method to reload records on demand in the data grid .

Include in Summary

Allow or deny a user to view the value in the Summary of a Base Form.

  • Select Yes to allow a user to view the value in the Summary of a Base Form.

  • Select No to deny a user to view the value in the Summary of a Base Form.

    The default value is No.

Note: 
- This property is applicable only when the control is used on a Base Form with Repeating property set to True, and the form is viewed on a small form factor mobile device.
- For information about Summary of a Base Form, see Base Form.

Use Culture Specific Values

Enable values of the grid to be stored as culture specific values.

  • Select Yes if you want to store the values of the grid as culture specific values.

  • Select No if you do not want to store the values of the grid as culture specific values.

    The default value is No.

Note:
- Stored values of different data types such as Number, String, Boolean, Date, Time, and DateTime will not be persisted across different cultures.
For example: If you submit a form from 'Fill Form' in 'en-US' culture and open the form from the 'Inbox' in 'pt-BR' culture, then the culture specific values are not persisted.
- This property appears in Data Grid only for upgraded repository from versions prior to Wonderware Skelta BPM 2017. For a new repository, this property will not be displayed and the value will be No internally.
- The SFU.getGridValue() API and the script having scriptable value as selectedValue and extendedInformation for data grid, now returns DateTime object.
- The DateTime values are displayed as per the browser time zone.

Scripts

For information about using scripts, see scripting guidelines for Data Grid control.

For an example on accessing values of a column of a selected row in a Data Grid, see Accessing Values of a Selected Row Through Other Controls

Note:
- The format and culture for date and time value displayed in the control is as per the current server and not as stored in the database.
- The number values are displayed in the data grid as per the culture, considering only the decimal separator.
- When the data type is not a string but a number, date, time and so on, the data type is first converted to string for comparison and then filtered accordingly.
- If the persist column is of DateTime type, then in runtime the grid displays only the seconds. The milliseconds are neither displayed nor persisted. Filter options such as equal to will not work if milliseconds is persisted in the database for the Date, Time, and DateTime data types.
- If Date type is configured as Database column in SQL server, the Date type is displayed in the DateTime format in the UI.
- While filtering data, it is recommended to enter only valid inputs for Date, Time, and DateTime data types.
- If the Boolean type has Null data in the database and if the Use Culture Specific Values property for the Data Grid is set to Yes, then the Null data for the Boolean type is displayed as False in the UI.

Multiple and Parameterized Data Grids

You can use two data grids, and populate the destination data grid based on the record selected in the source data grid. The destination data grid is also called as the parameterized data grid as it is populated using the parameters from the source data grid.

The behavior of the data grids on data change with the Multiple Selection property is as follows.

Value of the Multiple Selection Property set for the Source Data Grid

Value of the Multiple Selection Property set for the Destination Data Grid

Behavior of the data grids on data change

No

No

If you select a record in the source data grid, then the destination data grid is populated and you can select a record in the destination grid.

No

Yes

If you select a record in the source data grid, then the destination data grid is populated and you can select a record or multiple records in the destination grid.

Yes

No

If you select a record in the source data grid, then the destination data grid is populated and you can select a record in the destination grid.

If you select multiple records in the source data grid, then the destination data grid is  not updated and results in an invalid scenario.

Yes

Yes

If you select a record or multiple records in the source data grid, then the destination data grid is populated and you can select a record or multiple records in the destination grid.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in