Control Bar
Introduction
A control bar of a template grid, data grid, and reference set selector allows you to manipulate the objects displayed by means of buttons. By default, both grids will be created with Search, New, Edit, and Delete buttons in the control bar:
The control bar can also include a number of selection options and spreadsheet export buttons, as well as microflow buttons for custom actions.
Control Bar Buttons
Most properties of control bar buttons are the same as properties of buttons. For more information on button properties, see Buttons.
To add additional buttons to the control bar, do the following:
- Right-click on the control bar while it is highlighed.
- Select Add button.
- Select the new type of button.
- Double-click on the new button to customize.
It is not possible to add additional buttons by dragging them from the Toolbox into the control bar.
When setting the visibility of control bar buttons, it is not possible to use currently selected objects for conditional visibility expressions, or visibility based on the selected objects’ attributes.
Sections below describe the purpose of each control bar button and their specific properties if any.
Search Button
The Search bar toggle button (with default caption Search) opens or hides the search bar. It is only present if the Show search bar property of the grid is set to either With button (initially open) or With button (initially closed).
Add Button
The Add button can only be used in the reference set selector. With this button, the user can select objects that have to be added to the reference set selector.
Page
The Page property indicates the page that is shown to users after they click this button. The user can use this page to select objects that have to be added to the reference set selector. This page should contain a data grid, template grid, or list view connected to the same entity as the reference set selector.
You can use an existing page or you can generate the appropriate page by either:
- Right-clicking the add button and selecting Generate page….
- Selecting New for the page.
Both these options allow you to create a page which has the correct format for use by the add button. You can, of course, edit the page to meet your own requirements once it has been generated.
See the Show a Page section of On Click Event and Events Section. Note that select pages must have a pop-up layout.
Create Button
The Create button (with the default caption New) allows an end-user to create new objects in a grid or reference set selector.
Entity
The Entity property determines of which entity this button should create an instance. If the entity that is connected to the grid or reference set selector has no specializations, the page editor will automatically set this property for you. Otherwise, you will have to select one of the specializations yourself.
For example, you have an entity Vehicle and two specializations: Bicycle and Car. In a grid, when you select Vehicle as a data source, you have to specify whether a Vehicle, a Bicycle or a Car will be created when the Create button is clicked. You can even have three New buttons, one for each specialization.
Action Button
An action button is a button that can perform various actions, such as calling a microflow or opening a page. The Edit and Delete buttons are action buttons created by default in a data grid and template grid control bar. For more information on action buttons, see Buttons.
Remove Button
The Remove button is a button specific for the reference set selector. With this button the end-user can remove objects that have been added to the reference set selector. For more information on a reference set selector, see Reference Set Selector.
Select Button
The Select button confirms the choice of a row of a grid when it is used for selecting an object for a reference selector or reference set selector. For this reason, the Select button can only be placed on a grid in a page that is connected to a reference selector or to the Add button of a reference set selector.
Select All Button
The Select all button allows an end-user to select all objects in a grid or a reference set selector.
Selection Type
The Selection type property determines whether the Select all button should select the objects on the current page, or the objects on all pages:
Value | Description |
---|---|
Select page (default) | Clicking this button selects all objects on the current page. |
Select all | Clicking this button selects all objects. |
Due to technical limitations, a button with the Select all selection type cannot be combined with Remove, Delete, or Select buttons.
An Edit button always behaves as if the selection type is Select page, regardless of the actual settings of the Select all button that had been used to select objects.
Deselect All Button
The Deselect all button lets the user deselect all rows in the grid or a reference set selector.
Export to Excel Button
The Export to Excel button allows end-users to export the contents of the grid or the reference set selector to an Excel file.
The Excel export function is only available in list widgets that have the XPath data source.
Constraints you are using for search fields and sorting will also be exported.
Maximum Number of Rows
The Maximum number of rows property indicates the maximum number of rows that can be present in the data grid when exporting. It can be useful to prevent end-users from exporting large quantities of data, potentially placing a heavy load on the server.
Date Export Format
The Date export format property defines the format dates will be exported. The possible options are the following ones:
- Date value (default) – date values are exported as real dates, so that it is possible to use Excel date functions like sorting
- Text – date values are exported exactly as shown in the data grid
Export to CSV Button
The Export to CSV button allows end-users to export the contents of the grid or the reference set selector to a CSV file.
The export to CSV function is only available in list widgets that have the XPath data source.
Constraints you are using for search fields and sorting will also be exported.
Decimal Separator
Decimal separator is a string used to separate the fractional part from the whole part in decimal values.
Default: .
Group Separator
Group separator is a string used to separate groups of digits in large numbers.
Default: ,
Delimiter
Delimiter is a string used to delimit values in the resulting CSV file.
Default: ;
Maximum Number of Rows
The Maximum number of rows property indicates the maximum number of rows that can be present in the data grid when exporting. It can be useful to prevent end-users from exporting large quantities of data, potentially placing a heavy load on the server.
Generate Excel Separator Hint
The Generate Excel separator hint property adds an extra line to the CSV file header that informs Excel what the separator character is. This solves compatibility issues with Excel and localization.
Use Grid Date Format
When Use grid date format property is enabled, the date format of the column is used. When this property is disabled, a format that is recognized by Excel as a date is used (yyyy-MM-dd).