Code Requirements
The datagrid as displayed below requires the following code:
XML
@inject IContactsService Service
<EZTable Recordset="@recordset" TModel="Contact">
<EZTableColumn Field="@nameof(context.Id)" Hyperlink="EditContact/{0}" />
<EZTableColumn Field="@nameof(context.Name)" />
<EZTableColumn Field="@nameof(context.Birthday)" />
<EZTableColumn Field="@nameof(context.Address)" />
<EZTableColumn Field="@nameof(context.PostalCode)" />
<EZTableColumn Field="@nameof(context.City)" />
</EZTable>
@code {
private EZRecordset<Contact>? recordset;
protected override void OnInitialized()
{
recordset = new(new EZRecordsetConfiguration<Contact>(Service));
base.OnInitialized();
}
}
List of Contacts
Id | Name | Birthday | Address | Postal code | City |
---|