parent
4bfa49f0c2
commit
1c3dcf10cf
@ -1,36 +1,28 @@
|
|||||||
@page "/list"
|
@page "/list"
|
||||||
|
@using Models
|
||||||
|
|
||||||
<h3>List</h3>
|
<h3>List</h3>
|
||||||
|
|
||||||
@if (items != null)
|
<DataGrid TItem="Item"
|
||||||
{
|
Data="@items"
|
||||||
|
ReadData="@OnReadData"
|
||||||
<table class="table">
|
TotalItems="@totalItem"
|
||||||
<thead>
|
PageSize="10"
|
||||||
<tr>
|
ShowPager
|
||||||
<th>Id</th>
|
Responsive>
|
||||||
<th>Display Name</th>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="#" />
|
||||||
<th>Stack Size</th>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" />
|
||||||
<th>Maximum Durability</th>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="Stack size" />
|
||||||
<th>Enchant Categories</th>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.MaxDurability)" Caption="Maximum durability" />
|
||||||
<th>Repair With</th>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.EnchantCategories)" Caption="Enchant categories">
|
||||||
<th>Created Date</th>
|
<DisplayTemplate>
|
||||||
</tr>
|
@(string.Join(", ", ((Item)context).EnchantCategories))
|
||||||
</thead>
|
</DisplayTemplate>
|
||||||
<tbody>
|
</DataGridColumn>
|
||||||
@foreach (var item in items)
|
<DataGridColumn TItem="Item" Field="@nameof(Item.RepairWith)" Caption="Repair with">
|
||||||
{
|
<DisplayTemplate>
|
||||||
<tr>
|
@(string.Join(", ", ((Item)context).RepairWith))
|
||||||
<td>@item.Id</td>
|
</DisplayTemplate>
|
||||||
<td>@item.DisplayName</td>
|
</DataGridColumn>
|
||||||
<td>@item.StackSize</td>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.CreatedDate)" Caption="Created date" DisplayFormat="{0:d}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" />
|
||||||
<td>@item.MaxDurability</td>
|
</DataGrid>
|
||||||
<td>@(string.Join(", ", item.EnchantCategories))</td>
|
|
||||||
<td>@(string.Join(", ", item.RepairWith))</td>
|
|
||||||
<td>@item.CreatedDate.ToShortDateString()</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in new issue