It is possible to share functions that are already implemented but hidden by using the default web project configuration. If new functions should be added they need to be programmed. Operating processes that are not implemented can be programmed using new modules. For more information, see Create New Module. If an existing operating process is being dealt with the default module being used can be extended. To do this, the module or component in which the new function will be inserted has to be found first.
The following example shows you how to add a function. You want to add the name of the current user to the "Welcome" text on your start page. Before you add a new function, add a new object copy in the example.
To add a function
|
NOTE: Once you have logged in to the Web Designer, the preview with the login page is loaded automatically. |
The Label control for the "Welcome" text is gray.
The file belonging to the control is opened as a tab in the definition tree view. In this case, it is the default object VI_Start.
A new tab is added for the object copy in the definition tree view. In addition, your web project is given a substitution rule.
|
NOTE: It is important not only to save the object copy with the modified function but also the default object with the automatically added substitution rule. |
The changes you have made are shown in the preview of your web project.
You must create an object copy to retain the predefined default object in its original state. Customer-specific modules can, of course, be edited without making a copy. For more information, see Creating Object Copies with the Wizard.
In order for texts or captions to be displayed on a web page, a Label node must be pasted into the definition tree.
To paste text or captions
The procedure is the same as creating a new module. For more information, see Create New Module.
A new Label-type node is inserted in the definition tree view and automatically marked.
The following settings are available.
|
NOTE: With the Execute action option, a subordinate Server action node is added to the Label node. To execute the action defined in the browser, click the label. Normally, Label controls, which are dependent on actions, are displayed differently in the browser (depending on the template file entered in the web project). |
The new text is shown in the preview window after compiling.
A grid shows any database content desired in tabular form. To paste in a grid, first find the place in the definition tree that represents the desired grid position on the web page.
|
NOTE: Because grids can only be inserted under Container-type nodes, select or insert a node of this type at the desired position. |
To insert grids
The procedure is the same as creating a new module. For more information, see Create New Module.
For more information, see Grid Display for Collection Data.
Setting | Description | ||
---|---|---|---|
Enable the user to sort columns |
If this option is enabled, the user can sort the columns in ascending or descending order by double-clicking the column header. This option is generally set for all columns in this dialog box but you can also set it separately for each column in the table. | ||
Sort collection |
Use this option to specify an initial sort order in the layer. If this option is not enabled, the data sets are shown in the order that they are in the data set. For example, data sets have a logical sort order if you entered appropriate data when the collection was loaded. | ||
Dynamic column width |
Use this option to automatically divide up the column widths based on the length of the entries in the rows by applying an internal optimization algorithm.
| ||
Fixed column width |
This option requires input in pixels. All columns in the grid are given the same fixed width. | ||
Custom column width | This option enables the width and the unit (pixel or %) to be edited individually for each column. |
You can use a simple code snippet to preset grouping of grids.
To preset grouping of grids
var dataSource = GridBand1.DataSource;
var col = dataSource.Table.GetColumn("UID_Department");
if (!dataSource.GroupingColumns.Contains(col))
dataSource.GroupingColumns.Add(col);
|
NOTE: Ensure that you select the identifier for GridBand1, the grid level and the column name for UID_Department that you want to group by. |
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy