View page - DataGrid

Home / Support / Administrators Guide / View page /

View page - DataGrid

1. Basic information

1.1. Description of the control

DataGrid is a lookup table that displays database records retrieved by a query from a database, with the possibility search and filtering records, and with the ability to export and import data.

1.2. Create a new control

A new datagrid can be created as follows from the preview page using the toolbar with controls:

  • First, clicking the mouse on the view page determines the position where the new datagrid should be placed. This will highlight the selected position with a gray horizontal line. Then just click on the ”DataGrid” item in the toolbar of the view page, fill in the attributes of the new control in the newly opened dialog, and then save. This will insert a new datagrid at a pre-selected location on the view page.
  • If the desired position is not determined before inserting a new datagrid, the new datagrid will be inserted at the end of the view page.

1.3. Edit or delete a control

  • Individual controls can be moved vertically on the view page using the Drag&Drop method. Moving consists of grabbing the control, preferably behind its name, and then dragging it to the desired location on the view page.
  • For security reasons, it is important to have the function of moving controls enabled using the ”Drag&Drop” check box located above the toolbar with controls. This field is unchecked each time you log in to the application.

2. List of bookmarks in the control settings dialog

  • In general - Setting general properties
  • View table - Lookup table column settings
  • Details - Settings for columns displayed in details
  • Search - Search settings
  • Rights - Rights settings
  • Administration - Setting other properties

2.1. ”General” tab

2.1.1. Common question

Obrázek.png

2.1.2. Name

  • The name of the control displayed in the header of the lookup table.
  • Placing the control name between the two bytes ensures that the lookup table is completely hidden if no record is the result of the query - for example, ”|Records in the Book table|”.
  • The right side can be followed by alternative HTML code, which will be displayed instead of the lookup table if no record is the result of the query - for example ”|Records in the Book |<img src="Images/Help.gif">“.

2.1.3. Dictionary

  • The dictionary lists the names of other controls, forms, view pages, categories, applications, and application groups used across the entire application.
  • The dictionary search is used to design the correct control name and to maintain the consistency of the nomenclature throughout the application so that controls with the same meaning located in different places in the application are named in the same way.

2.1.4. Width

  • The width of the control, expressed in pixels.
  • If this input field is not filled in, the width of the look-up table will be determined automatically by the web browser.

2.1.5. Data source

  • The data source defines the source database records displayed in the lookup table.
  • Data source settings are made in the graphical designer of database queries. A detailed description of the database query designer is provided in the separate ”Database Query Designer” guide.

2.1.6. Options

  • Show ”New Record” icon
    • Checking this box determines whether an icon should be displayed in the header of the lookup table, which redirects the user to a specific edit form in order to create a new record in the database.
  • Disable customization
    • Checking this box determines whether individual users should be disabled from changing the column settings of this lookup table.
  • Enable data import
    • Checking this box determines whether an icon should be displayed in the header of the lookup table, which will allow data to be imported into the displayed database table from format files.
      • XML
      • XLS(X) (Excel)
      • CSV (Excel)
      • MDB (Access)
      • ZIP - zipped variant of the above formats

Obrázek.png

  • Enable MS Excel Import
    • Checking this box determines whether an icon should be displayed in the header of the lookup table, which will allow the export and subsequent import of the displayed data in the lookup table into the database table using an XLS file.
    • This feature is only available for lookup tables that do not use joins.

Obrázek.png

Obrázek.png

  • Disable data export
    • Checking this box determines whether an icon should be displayed in the header of the lookup table, which will allow the export of displayed data from the lookup table to format files.
      • XLS(X) (Excel)
      • CSV (Excel)
      • DOC(X) (Word)
      • EML (Outlook Express)
      • HTML
      • TXT
      • SQL
      • PDF
      • C#
      • XML

Obrázek.png

  • Disable opening records
    • Checking this box determines whether all users should be denied access to the edit form to open the displayed database record using the pencil icon that appears at the beginning of each row of the lookup table.
  • Allow bulk changes
    • Checking this box determines whether a text box or drop-down list with the selected value should be displayed in the lookup table instead of the control value itself, with the option to change the value without opening and editing the record in the edit form.
      • This function is applied only to controls that have the ”Allow bulk changes” check box selected on the ”General” tab.
      • Bulk changes can only be made by a logged-in user, a text box or a read-only drop-down list is displayed to an anonymous user.
    • Checking this box determines whether the ”Assign value…” item should be available in the drop-down list of individual column filters, which is used to assign a value to all marked or filtered records in the lookup table.
      • This function is applied only to controls that have the ”Allow bulk changes” check box selected on the ”Filters” tab.
      • Bulk changes can only be made by a logged-in user.
      • If specific records are marked in the lookup table, only the selected records will be assigned a value. If no records are marked, all filtered records will be assigned a value.
    • Checking this box determines whether the ”Delete records in lookup table” icon should be available in the lookup table header, which is used to delete marked or filtered records in the lookup table.
      • Users with administrator privileges - if specific records are marked in the view table, only the marked records will be deleted. If no records are marked, all filtered records will be deleted!
      • Users without administrator privileges can only delete marked specific records, they do not have permission to delete all filtered records.
    • Checking this box determines whether the ”Mark records” icon should be available in the lookup table header, which is used to mark individual lookup table records in order to delete them or assign a value using a filter.
      • The list of marked records - primary key values (column ”id”) separated by a semicolon - can be accessed using the variables ”#datagrid1#”, ”#datagrid2#”, ”#datagrid3#”, etc. in the script. The index indicates the order of the lookup table on the lookup page.
  • Enable record tagging
    • Checking this box determines whether a check box should be automatically displayed at the beginning of each row of the lookup table to mark a record in order to delete it or assign a value using a filter, without using the ”Mark records” icon located in the lookup table header.
      • The list of marked records - primary key values (column ”id”) separated by a semicolon - can be accessed using the variables ”#datagrid1#”, ”#datagrid2#”, ”#data grid3#”, etc. in the script. The index indicates the order of the lookup table on the lookup page.
  • Show column totals
    • Checking this box determines whether a row with the sum of the values of the individual columns should be displayed in the footer of the look-up table.
    • This function is applied only to TextBox controls of numeric data types that do not have the ”Hide column total in lookup table” check box selected on the ”General” tab.
  • Hide nested records
    • Checking this box determines whether the ”PID = 0 or PID not defined” constraint should be automatically appended to the database query definition.

2.1.7. Aggregation query without grouping by date

Obrázek.png

  • Disable data export
    • Checking this box determines whether an icon should be displayed in the header of the lookup table that allows the displayed data to be exported from the lookup table to an XLS file.
  • Show column totals
    • Checking this box determines whether a row with the sum of the values of the individual columns should be displayed in the footer of the look-up table.
    • This function is applied only to columns that do not use the command to hide the sum of the column using the syntax ”Column@-sum”. A detailed description of the syntax of column names is given in the separate ”Administrator's Guide”.

2.1.8. Aggregation query with grouping by date

Obrázek.png

  • Disable data export
    • Checking this box determines whether an icon should be displayed in the header of the lookup table that allows the displayed data to be exported from the lookup table to an XLS file.
  • Fill time gaps
    • Checking this box determines whether time continuity should be ensured in the resulting data set in the column according to which the data is grouped. Where aggregated rows are missing, they will be automatically populated with all other columns set to ”0”.
  • Show column totals
    • Checking this box determines whether a row with the sum of the values of the individual columns should be displayed in the footer of the look-up table.
    • This function is applied only to columns that do not use the command to hide the sum of the colu mn using the syntax ”Column@-sum”. A detailed description of the syntax of column names is given in the separate ”Administrator's Guide”.
  • Snap to the previous control
    • Checking this box determines whether the control itself should be displayed to the right of the previous one in the edit form, or whether it will be displayed below the previous control in the usual way.

2.2. ”View table” tab

Obrázek.png

2.2.1. Options

  • Show the top navigation bar
    • Checking this box determines whether a toolbar with icons for switching between pages should be displayed in the header of the lookup table.
    • By default, this toolbar is displayed in the footer of each lookup table if the number of data displayed is greater than the number of records on the page.
  • Show filters
    • Checking this box determines whether the lookup table should allow filtering of database records.

2.2.2. Columns

  • Define the default settings of lookup table columns.

2.2.3. The number of records per page

  • For clarity, the look-up table uses the paging of the displayed records. This is useful in situations where the lookup table is retrieving large amounts of data.
  • The number of records per page determines the maximum number of records that appear on one page. You can easily switch between the individual pages using the toolbar, which is contained in each view table in its footer, or optionally in the header.

2.3. Details tab

Obrázek.png

2.3.1. Options

  • Show details
    • Checking this box determines whether the lookup table should display the details of each record at the bottom of the lookup table.
  • Show tooltip
    • Checking this box determines whether the lookup table should display the details of individual records in the tooltip when the mouse hovers over individual records.

2.3.2. Columns

  • Define the default settings for detail columns.

2.4. Search tab

Obrázek.png

2.4.1. Options

  • Activate search
    • Checking this box determines whether a row with a search box and a ”Search” button should be automatically displayed in the header of the lookup table.
  • Optimized search
    • Checking this box determines whether each column of the lookup table should have its own search box.
  • Show only search results
    • Checking this box determines whether the data in the lookup table should be displayed only when entering a search term.

2.5. ”Rights” tab

Obrázek.png

2.5.1. Right

  • Rights define a list of user groups and users who have permission to display the control on the view page.

2.5.2. Replace rights with other controls

  • The ”Replace rights to other controls” feature is used to unify rights across the entire view page for controls that are related in terms of rights.
  • Thanks to the ”Show…” link, it is possible to display a list of all controls on the view page, including the settings of the rights of these controls. For each control, a check box is displayed that allows you to select the control. When you save a control, the same rights are then set for those selected controls.
  • An alternative for unifying rights within the entire view page is to display the report available from the ”Subordinate object rights” tab in the view page settings.

2.6. ”Administration” tab

Obrázek.png

  • The ”Administration” tab is only displayed for existing controls.

2.6.1. template name

  • The template name is used to name the lookup table with the option to copy it when creating other lookup tables with the same source database table.
  • When creating a new lookup table, you must first define the data source using a database query, and then all available templates are available in the ”Templates” drop-down list on the ”General” tab. After selecting a template, all parameters of the view table will be automatically pre-filled with data from the selected template.
  • A list of all look-up tables that are marked as templates can be displayed using a report. A detailed description of the reports is given in a separate manual ”Reports”.

2.6.2. Location

  • Select the view page on which the control is located.
  • The drop-down list contains all view page s located in the same application.

2.6.3. Change type to

  • The drop-down list offers the types of controls to which conversion of the control is supported.

3. Examples

3.1. Javascript functions

  • dg_Disable();
  • dg_Enable();
  • dg_HideColumn (DG123, 456);
  • dg_HideColumn (el (DG123), 456);
  • dg_HideHeader (DG123);
  • dg_SearchColumns (DG123, [1, 2, 3]);
  • dg_SearchColumns (el (DG123), [1, 2, 3]);
  • dg_ShowColumn (DG123, 456);
  • dg_ShowColumn (el (DG123), 456);
  • dg_VisibleColumns (DG123, [1, 2, 3]);
  • dg_VisibleColumns (el (DG123), [1, 2, 3]);
  • var array = dg_Controls (el (DG123));

3.2. Variables

  • #datagrid1#
  • #datagrid2#
  • #datagrid3#