Use a DataGrid widget to display a collection of data in rows and columns (tabular format). The DataGrid widget supports common table formatting options, such as alternating the row background color,
customizing the grid line, and the ability to hide or show headers.
To learn how to use this widget programmatically, refer Quantum Visualizer Widget guide.
The following are important considerations for a DataGrid widget.
Look properties define the appearance of the widget. The following are the major properties you can set:
- Whether the widget is visible.
- The platforms on which the widget is rendered.
- How the widget aligns with its parent widget and neighboring widgets.
- If the widget displays content, where the content appears.
For descriptions of the properties available on the Look tab of the Properties pane, see Look.
Skin properties define a skin for the widget, including background color, borders, and shadows. If the widget includes text, you can also specify the text font.
For a DataGrid widget, you can apply a skin and its associated properties for the following states:
||The skin applied to the Header row.
||The skin applied when the row does not have the focus.
Row - Alternate
The skin applied to alternate rows.
|Row - Focus
||The skin applied when the row has the focus.
The look and feel of the widget when the cursor hovers over the widget.
Note: Hover skins are available only on the Windows (native) Tablet platform.
For more information about applying skins, see Understanding Skins and Themes.
DataGrid properties specify properties that are available on any platform supported by Quantum Visualizer, and assign platform-specific properties.
Represents the data displayed in each cell of the data grid.
To input the data, click the Edit button to open the Master Data : DataGrid dialog box.
The Master Data : DataGrid dialog box includes two tabs:
The Columns table lets you provide details such as:
- ID: Specifies the unique identifier of a column.
- Header: Specifies the Column header.
- Column Type: Specifies whether the column type is text or image.
- Width (%): Specifies the width of each column as percentage of the data grid.
- Sort: Specifies whether sorting is enabled for the column.
- Alignment: Specifies the alignment of the content in each column. The following alignment options are available:
- OnClick: Specifies an action that takes place when you click on the header of a column. To specify an OnClick action for a column, click the ellipses button (...).
The fields in the Rows tab are based on the inputs provided in the Columns tab and include:
- Column Headers are the Header values specified in the Columns tab.
- Table cells whose Column Type is Text are text fields. You can type the text within these cells.
- Table cells whose Column Type is Image are image fields. You can choose an image to be displayed in these cells. Click the ellipses button (...) in the image field to open theSelect Image dialog box, and then select an image or provide the URL of the image and click OK. The selected image displays in the cell.
- The text or image is aligned according to the Alignment setting.
Specifies whether you can choose multiple rows of the DataGird. The Row - Focus skin is applied to selected rows.
Specifies the visibility of the DataGrid column headers.
Grid Line Color
Specifies the color of the grid line.
Note: This property is specific to the Android platform.
For the Windows Tablet platform, specifies a message that displays when you hover the mouse pointer over the widget .
Actions define what happens when an event occurs. On a DataGrid widget, you can run an action when the following event occurs:
- onRowSelected: The action is triggered when a row is selected.
- onTouchStart: The action is triggered when the user touches the touch surface. This event occurs asynchronously.
- onTouchMove: The action is triggered when the touch moves on the touch surface continuously until movement ends. This event occurs asynchronously.
- onTouchEnd: The action is triggered when the user touch is released from the touch surface. This event occurs asynchronously.
For more information on using this action, see Add Actions.
Placement Inside a Widget
The following table summarizes where a DataGrid widget can be placed:
Orientation - Yes
Orientation - Yes
|| © 2020 Temenos. All rights reserved.