<xmod:EditButton>
<xmod:EditButton> renders a push-button that opens the EditForm for the current row. The supplied <Parameter> tags fill the EditForm's <SelectCommand> parameters so the form loads the correct record.
This tag is gated by the parent template's EditRoles. Place it inside <ItemTemplate> or <AlternatingItemTemplate> so each row gets its own button with row-specific parameters.
Sibling variants
<xmod:EditImage>— same behavior, rendered as a clickable image<xmod:EditLink>— same behavior, rendered as a hyperlink
Example
<xmod:Template Id="Employees">
<ListDataSource CommandText="SELECT * FROM Employees WHERE DepartmentId = @DepartmentId">
<Parameter Name="DepartmentId" Alias="DepartmentId" />
</ListDataSource>
<ItemTemplate>
<strong>[[FirstName]] [[LastName]]</strong>
<xmod:EditButton Text="Edit Employee">
<Parameter Name="EmployeeId" Value="[[EmployeeId]]" DataType="Int32" />
</xmod:EditButton>
</ItemTemplate>
</xmod:Template>
<EditForm>
<SelectCommand CommandText="SELECT * FROM Employees WHERE EmployeeId = @EmployeeId" />
...
</EditForm>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Properties
| Property | Values | Default | Description |
|---|---|---|---|
| ID | string | Unique identifier for the button | |
| Text | string | Caption displayed on the button | |
| Ajax | True False | False | When True, opens the EditForm via async postback. Requires ID set (since v2.6) |
| Form | form name | Override the configured EditForm with a different form (since v4.7) | |
| CssClass | string | CSS class name(s) | |
| Style | string | Inline CSS | |
| Width | size | Width of the button | |
| Height | size | Height of the button | |
| ToolTip | string | Hover tooltip | |
| Visible | True False | True | Shows or hides the button |
| OnClientClick | JavaScript | Client-side script to run on click. Returning false cancels the action | |
| AccessKey | string | Keyboard shortcut character | |
| Enabled | True False | True | When False, the button is disabled |
| TabIndex | integer | Tab order for keyboard navigation |
Deprecated Properties (styling)
| Property | Description |
|---|---|
| BackColor / BorderColor / BorderStyle / BorderWidth | Use CssClass or Style instead |
| Font-Bold / Font-Italic / Font-Names / Font-Overline / Font-Size / Font-Strikeout / Font-Underline | Use CssClass instead |
| ForeColor | Use CssClass or Style instead |
Child Tags
| Tag | Required | Description |
|---|---|---|
<Parameter> | required (one per <SelectCommand> parameter) | Supplies the value for the EditForm's <SelectCommand> parameter of the same name |
<Parameter>
Use one <Parameter> for each @param in the EditForm's <SelectCommand>. The values are typically field tokens that identify the row.
| Attribute | Values | Default | Description |
|---|---|---|---|
| Name * | string | Parameter name (matches @param in the EditForm's SelectCommand) | |
| Value | string | token | Parameter value. Field tokens like [[ID]] are typical | |
| DataType | database type | String | Data type used when binding |
Property Details
Ajax: When
True, the EditForm appears in place via async postback rather than a full page refresh. The button must have itsIDproperty set for AJAX to work. The parent<xmod:Template>should also haveAjax="True".Form: Specifies an alternate form name to load instead of the EditForm configured for the module. Useful when one page has multiple
<xmod:Template>tags and each needs its own EditForm.