|
<SfGrid ID="Grid" DataSource="@Orders" @ref="Grid" AllowFiltering="true" AllowGrouping="true" AllowExcelExport="true"
Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update","ExcelExport"})" Height="315" Width="900">
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Normal"></GridEditSettings>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.FilterBar"></GridFilterSettings>
<GridEvents OnActionComplete="ActionCompletedHandler" OnToolbarClick="ToolbarClick" TValue="Order"></GridEvents>
<GridColumns>
. . . . . . . .
<GridColumn Field="Address.ShipCountry" HeaderText="Ship Country" EditType="EditType.DropDownEdit" Width="150">
<EditTemplate>
<SfDropDownList ID="Address___ShipCountry" TValue="string" TItem="string" DataSource="@_countries" Value="@((context as Order).Address.ShipCountry)">
<DropDownListFieldSettings Value="Address.ShipCountry"></DropDownListFieldSettings>
</SfDropDownList>
</EditTemplate>
</GridColumn>
</GridColumns>
</SfGrid>
|