|
</SfGrid>
<GridColumns>
<GridColumn Field=@nameof(OrdersDetails.ShipCountry) HeaderText="Ship Country" Width="150"></GridColumn>
<GridColumn Field=@nameof(OrdersDetails.ShipAddress) HeaderText="ShipAddress" Width="0"></GridColumn>
</GridColumns>
</SfGrid> |
|
@using System.ComponentModel.DataAnnotations
<SfGrid DataSource="@GridData" Toolbar="@(new string[] {"Add", "Edit" ,"Delete","Update","Cancel" })">
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="@EditMode.Dialog">
<Validator>
<DataAnnotationsValidator></DataAnnotationsValidator>
</Validator>
<Template>
@{
var Order = (context as OrdersDetails);
<div>
<ValidationMessage For="() => Order.ShipCountry" />
<ValidationMessage For="() => Order.ShipAddress" />
..
..
..
<div>
}
</Template>
</GridEditSettings>
</SfGrid> |