|
<SfGrid @ref="Grid" AllowPaging="true" DataSource="@Orders" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<GridEditSettings AllowEditing="true" AllowDeleting="true" AllowAdding="true" Mode="@EditMode.Normal"></GridEditSettings>
<GridColumns>
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" Visible="false" IsPrimaryKey="true" TextAlign="@TextAlign.Center" Width="140"></GridColumn>
<Template>
@{
var employee = (context as Order);
<div>
First Name
</div>
<div @onkeydown:stopPropagation="true">
<SfTextBox @bind-Value="@employee.FirstName"></SfTextBox>
</div>
}
</Template>
</GridColumn>
<Template>
@{
var employee = (context as Order);
<div>
Last Name
</div>
<div @onkeydown:stopPropagation="true">
<SfTextBox @bind-Value="@employee.LastName"></SfTextBox>
</div>
}
</Template>
</GridColumn>
</GridColumns>
</SfGrid> |