<SfGrid ID="Grid" @ref="@Grid" TValue="Customer" AllowSorting="true" AllowResizing="true" AllowReordering="true" AllowPaging="true" Toolbar="@(new List<string>() { "Search", "Add", "Edit","Delete", "Update","Cancel" })" AllowFiltering="true" AllowSelection="true">
<SfDataManager Url="/api/Values" Adaptor="Adaptors.UrlAdaptor"></SfDataManager>
. . .
<GridColumns>
. . .
<GridColumn HeaderText="Actions" Width="150">
<Template>
@{
Customer dto = (context as Customer);
// For testing purpose to see if the id is correct
<SfDropDownList @key="@dto.CustomerId" TItem="NameValue" TValue="string" PopupHeight="230px" Placeholder="@saction" DataSource="@Actions">
<DropDownListEvents TValue="string" ValueChange="((x) => OnChange(x, (context as Customer).CustomerId))"></DropDownListEvents>
<DropDownListFieldSettings Text="name" Value="value"></DropDownListFieldSettings>
</SfDropDownList>
}
</Template>
</GridColumn>
</GridColumns>
</SfGrid> |