Skip to content

Spreadsheet

Spreadsheet renders repeated data as an editable grid. XPath selects the collection context and ItemXPath selects the rows below that context; ItemXPath defaults to *. Changes made in the grid update the corresponding row nodes in the form data.

XML Fields

Rows

  • XPath selects the collection context. ItemXPath selects each row below that context; use * when every direct child is a row.
  • Rules applies conditional behavior to the spreadsheet as a whole.

Columns and Editing

  • Every Columns/Column uses XPath to select a field in the current row. Type chooses the cell data type and editor; Align controls display alignment. Label provides the column heading.
  • DataSources supplies list choices for a column. Editor contains optional controls used to edit a selected row; leave it empty when direct grid editing is sufficient.

Columns and Editors

Each Column has a label, a field XPath, alignment, and a Type: Text, Number, Date, DateTime, Time, or Boolean. The client chooses an editor and filter appropriate to that type. Date values use their date portion; DateTime editor values omit the timezone portion while editing, so choose the column type to match the data model.

The optional Editor control collection provides a row editor. The grid enables paging and supports range selection. It refreshes when its item collection changes or when its own bound node changes while visible.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<Spreadsheet XPath="Lines" ItemXPath="Line">
    <Columns>
        <Column XPath="Description" Type="Text" Align="Left">
            <Label><Content>Description</Content></Label>
            <DataSources />
        </Column>
        <Column XPath="Quantity" Type="Number" Align="Right">
            <Label><Content>Quantity</Content></Label>
            <DataSources />
        </Column>
        <Column XPath="DueDate" Type="Date" Align="Left">
            <Label><Content>Due date</Content></Label>
            <DataSources />
        </Column>
    </Columns>
    <Editor />
    <Rules />
</Spreadsheet>