Detail Tables
Introduction
Detail Tables allow managing repetitive data lists within a form (e.g.: order lines, participant list, history). They are stored in a dedicated database table (starting with FRM_LD).
Creation and Configuration
- In the Forms module, click on Detail Tables.
- Click New.

General Settings
- Name: Unique identifier (no spaces/accents).
- Title: Label displayed in the form.
- Edit Mode:
- Inline: Direct input in the grid (Excel-like).
- Panel: Input form above/below the table.
- Pop-up: Input form in a modal window.
Column Management
Columns define the fields for each row.
- Click the Add column button.
- Configure properties:
General Properties
- Label: The column title visible to the user (e.g. "Unit Price").
- Name: The internal identifier of the column in the database (no spaces or accents, e.g.
UNIT_PRICE). - Column Type:
- Text: Free input (with Multi-line option).
- Number: Integer, Decimal (choice of decimals), Currency or Percentage.
- Date: Calendar field.
- Dropdown List: Selection from a list (SQL or Value List).
- Calculated Field: Mathematical formula or C# (e.g.
Qty * Price).

Display and Behavior Properties
- Alignment: Text position (Left, Center, Right).
- Required: Makes input mandatory before validation.
- Read Only: Prevents modification (useful for calculation results).
- Max Size: Limits the number of allowed characters.
Advanced Properties
- Sort Order: Defines if the table is sorted by default on this column (Ascending, Descending, None).
- Sort Index: In case of multiple sorts, defines the priority (1 = primary sort, 2 = secondary sort).
- Depends on: (For lists) Allows filtering the content of this list based on the value selected in another column (Cascading Dropdown).
JavaScript Events (Client)
To make tables interactive (immediate calculations, input controls, autocompletion), you can attach JavaScript scripts to column events.
- Select the column.
- Open the JavaScript Events tab.
- Choose a trigger (Event) and click Add.

Main available triggers:
- Init: When the cell loads.
- GotFocus / LostFocus: When the user enters or exits the cell.
- ValueChanged: When the value changes (after validation).
- TextChanged: At each keystroke (for real-time filters).
- KeyDown / KeyUp / KeyPress: Fine keyboard interactions.
[!TIP] You can define calculations between columns (e.g.
TotalPrice = Quantity * UnitPrice) via JavaScript scripts or advanced properties.
Events and Scripts (C#)
For advanced needs (complex validation, audit trail, server calculations), you can attach C# code to table events.
Server Events
Accessible via the "Events" button in the table toolbar. You can intercept:
RowInserting: Before adding a row.RowUpdating: Before modification.RowDeleting: Before deletion.OnInit: When the table loads.
Example: Date validation
Check that EndDate is later than StartDate.
var grid = (ASPxGridView) sender;
var startDate = e.NewValues["DATEPREVUE"] as DateTime?;
var endDate = e.NewValues["DATEFIN"] as DateTime?;
if (startDate != null && endDate != null)
{
if(startDate.Value.CompareTo(endDate.Value) > 0)
{
e.Errors.Add(grid.Columns["DATEFIN"], "The end date cannot be earlier than the start date.");
}
}
Example: Audit Trail (Logging)
To track modifications in a table (Who modified what and when). Code to place in RowUpdating for example.
Avanteam.Application.Log.ApplicationLogAction ala = new Avanteam.Application.Log.ApplicationLogAction(
"",
Avanteam.Application.Security.APSUser.GetUserFromSession().DisplayName,
DateTime.Now,
Avanteam.Application.Log.TypeLogAction.Modify,
"Detail table modification");
// Adding details (Before/After)
// ... (See complete documentation for detailed implementation)
Avanteam.Application.Log.DataSource.ApplicationLogManagerWrapper ALMW = new Avanteam.Application.Log.DataSource.ApplicationLogManagerWrapper();
ALMW.AddLogAction(ala);
Associated Files
To avoid writing all code in the editor, you can attach external C# (.cs) or JavaScript (.js) files.
- Click the "Associated Files" button (Paperclip).
- Upload your file.
- Important: For C# files, the class must be in the namespace:
namespace Avanteam.Code.TableauxDeDetails
using System;
namespace Avanteam.Code.TableauxDeDetails
{
public static class MyBusinessRules
{
public static void ValidateRow(ASPxGridView grid, ...) { ... }
}
}
Usage
Once created, the table must be published in a form page via the Forms > Publish > Detail table menu.
[!NOTE] Table data is saved at the same time as the main document.
Going Further
Document Generation
It is possible to automatically generate child documents from detail table rows (e.g.: 1 row = 1 "Action" document). This requires using a specific workflow Automatic Action (DLL) configured to loop through the FRM_LD_... table.
Consult the FAQs or support to get the code template (CreationActions.cs).