Hello,
In an EditTemplate of a Sfgrid (ODataV4Adaptor), I have a SfDropDownList fullfilled by ODataV4Adaptor.
On select, the SfDropDownList updates @cLine.ProductId well, but not the @cLine.Product.Packaging.Name (via expand).
How can I refresh the expand when a line is selected in the SfDropDownList.
Regards,
JF
<SfGrid ID="Grid" TValue="GetAllPagedCLinesResponse" @ref="CLinesGrid" Query="@GridQuery">
<SfDataManager Url="/odata/CLines" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Dialog">
<Template>
@{
var cLine = (context as GetAllPagedCLinesResponse);
<SfDropDownList TValue="int?" TItem="GetAllPagedProductsResponse" AllowFiltering="true" Query="@ProductsQuery" @bind-Value="@(cLine.ProductId)">
<DropDownListTemplates TItem="GetAllPagedProductsResponse">
<ItemTemplate Context="GetAllPagedProductsResponse">
<span>
<span class='name'>@(GetAllPagedProductsResponse.Name)</span>
<span class='productid'>@(GetAllPagedProductsResponse.ProductId)</span>
</span>
</ItemTemplate>
</DropDownListTemplates>
<SfDataManager Url="/odata/Products" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<DropDownListFieldSettings Text="Name" Value="Id" />
</SfDropDownList>
<SfTextBox Value="@cLine.Product.Packaging.Name"></SfTextBox>
}
</Template>
</GridEditSettings>
...
[code]
ProductsQuery = new Query().Expand(new List<string> { "Packaging", "Category" });
[/code]