<SfGrid DataSource="@Orders" AllowPaging="true" AllowGrouping="true">
<GridGroupSettings ShowGroupedColumn="true"></GridGroupSettings>
..
</SfGrid> |
<GridColumn Field=@nameof(BetonColonneVM.BetonColonneType) EnableGroupByFormat="true" HeaderText="Code" EditType="EditType.DropDownEdit" TextAlign="TextAlign.Right" Width="100" AllowEditing="true" >
<Template>
@{
var ctx = (context as BetonColonneVM);
if (ctx.BetonColonneType != null)
{
<span>@ctx.BetonColonneType.Code</span>
}
}
</Template>
<EditTemplate>
<SfDropDownList ID="ddown" Placeholder="Choisir un type" TItem="BetonColonneTypeVM" TValue="BetonColonneTypeVM" @bind-Value="@((context as BetonColonneVM).BetonColonneType)" DataSource="ColonneTypes">
<DropDownListEvents TValue="BetonColonneTypeVM" TItem="BetonColonneTypeVM" ValueChange="ValueChange"></DropDownListEvents>
<DropDownListFieldSettings Text="Code" Value="BetonColonneTypeVM"></DropDownListFieldSettings>
</SfDropDownList>
</EditTemplate>
</GridColumn>
Field=@nameof(BetonColonneVM.BetonColonneTypeId) instead of Field=@nameof(BetonColonneVM.BetonColonneType)