Refresh odata expand after SfDropDownList select

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]

2 Replies

JH Jean-François Hermans September 26, 2022 11:15 AM UTC

ProductsQuery = new Query().Expand(new List<string> { "Packaging", "Category" });



SP Sarveswaran Palani Syncfusion Team September 29, 2022 05:01 AM UTC

Hi Jean,


Sorry for the inconvenience caused.


We have analyzed your query and facing some complexities while evaluating. Before proceeding further kindly share the following details to validate the reported query further at our end.

  1. If you want to update in DropDownList change event?
  2. Kindly share the what kind of issue you’re facing?
  3. Share video demo of the issue, it’ll be more useful to us to understand your query
  4. share issue reproducible runnable sample to us


Above requested details will be helpful for us to validate the reported query at our end and provide solution as early as possible. 


Regards,

Sarveswaran PK


Loader.
Up arrow icon