[Merge Cells Begin]


Merges can be used to position controls in groups for both grid and UX components. Merging controls is only possible when the grid format is columnar and the Number of Layout Columns property, found under the Layout Options on the Properties page, is set to a value greater than 1. Merges can be used to combine multiple fields under one title. For example, if you have a firstname field and a lastname field, you could combine them under one merged group and give it the title 'Full Name'.



Force a column break before, after, or both before and after the group of merged cells.

Column heading

Specify the column heading for the merged cells.

Row heading

Specify the row heading/label for the merged cells.

Heading in-line style

Specify style attributes that override the settings inherited from the style sheet.

Can sort

Can sort property.

Sort field

Specify the field to sort on when user clicks on the column title. In the case of .DBF files, you can enter a field name, or expression. In the case of SQL databases, you can enter any valid SQL 'Order by' clause (e.g. 'Lastname, Firstname'). In the case of SQL databases, if the sort field is not the same as the fieldname, you must use the correct syntax. For example, if the sort field is 'customer name' and the target Database is SQL server, the correct syntax is '[customer name]'.

Using Merges for Control Positioning 

  1. In the Grid Builder go to the Design tab and open the Component Type page. In the Grid Layout menu select Form (Columnar) .

  2. Open the Data Source page and select either .dbf or SQL . On the Query(DBF) or Query(AlphaDAO) connect to the table that you will draw data from.

  3. Click Select Primary Key and check a field that you will include in your grid.

  4. Open the grid's Fields page. Move 10 fields from the Available Fields: list to the Selected: Fields list.

  5. Go the grid Properties page and under the Layout Options page change the Number of 'Layout' Columns property to 3.

  6. View your grid in Live Preview . It should look something like this:

  7. Return to the Fields page on the Design tab. Select a field in the Selected: fields list and then click the Insert... hyperlink; the link is located underneath the Available Fields: list.

  8. The Insert Special Control dialog will open. Select the [Merge Cells Begin] control and click OK .

  9. Now select a second field underneath [Merge Cells Begin] and click the Insert... hyperlink again. When the Insert Special Control dialog opens select [Merge Cells End] and click OK .

  10. Use the up and down arrows to the right of the Selected: fields list to move related fields inside the Merge Cell. For example, move all fields relating to a name or address inside the Merge cells.

  11. Repeat steps 7 through 12 to create a second set of Merge Cells with a Row heading.

  12. Go to the Live Preview tab and click Full Preview. The grid should look something like this.

    The Merge cell entitled ' Address' now combines the Address, PostalCode, City, Region, and Country fields in this grid. The Merge cell named ' Contact' combines the ContactName and ContactTitle fields.
  13. Go to the Design tab and open the Fields page again. Select one of the fields inside a Merge cell you defined. Go over to the Field Properties list and scroll down to Row Properties.

  14. Find the Break property and change it from 'None' to 'Break After' using the drop down. Repeat this process for your second Merge Cell.

  15. Go to Live Preview.

    In this example Breaks have been added after the Contact Name and PostalCode fields. Notice how this impacts the Contact and AddressMerge Cells that contain these fields. See also Number of 'Layout' Columns

See Also