I have a dropdownlist inside a grid column, which works perfectly well for viewing data. I would like to bind it to the currently selected row so that the item in the list that is showing when viewing the grid gets selected in the dropdownlist when the its row is being edited. Currently, when a row is in edit mode, the dropdownlist item selected becomes blank.
<SfGrid DataSource="@model.AgencyProducts" EnableVirtualization="true" TValue="AgencyProduct" AllowSelection="true" AllowSorting="true" AllowReordering="true" AllowResizing="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Save", "Cancel" })">
<GridSelectionSettings Type="Syncfusion.Blazor.Grids.SelectionType.Single"></GridSelectionSettings>
<GridEditSettings AllowEditing="true" AllowEditOnDblClick="true" AllowNextRowEdit="true" AllowAdding="true" AllowDeleting="true" NewRowPosition="Syncfusion.Blazor.Grids.NewRowPosition.Bottom" ShowDeleteConfirmDialog="true"></GridEditSettings>
<GridEvents TValue="AgencyProduct" OnActionComplete="OnActionComplete" />
<GridColumns>
<GridColumn Field=@nameof(AgencyProduct.Id) HeaderText="Id" IsPrimaryKey="true" IsIdentity="true" Visible="false" AutoFit="true"></GridColumn>
<GridColumn Field=@nameof(AgencyProduct.Name) HeaderText="Product" AutoFit="true" DataSource="@agencyProducts">
<EditTemplate Context="ap">
<div class="btn-container">
<SfDropDownList TItem="Product" TValue="string" Placeholder="Select a product" DataSource="@products" AutoFit="true">
<DropDownListFieldSettings Value="Id" Text="Name"></DropDownListFieldSettings>
</SfDropDownList>
</div>
</EditTemplate>
</GridColumn>
<GridColumn Field=@nameof(AgencyProduct.ConnectOnHand) HeaderText="Connect On Hand*" AutoFit="true" AllowEditing="false"></GridColumn>
<GridColumn Field=@nameof(AgencyProduct.OrderQuantity) HeaderText="Order Quantity" AutoFit="true"></GridColumn>
<GridColumn Field=@nameof(AgencyProduct.LotCodes) HeaderText="Lot Codes" AutoFit="true"></GridColumn>
<GridColumn Field=@nameof(AgencyProduct.PalletSpaces) HeaderText="Pallet Spaces" AutoFit="true"></GridColumn>
</GridColumns>
</SfGrid>