Updating SfMultiSelect's value not working
Hi,
When we update the original bind-Value (we set a value and this displays) the value is not updating
TValue="int[]" @bind-Value="Reservation.TableIds"
Any ideas?
Alex
Hello Alex,
We have validated the reported query on our end, but unfortunately, we were unable to reproduce the reported issue as per your scenario. We have also shared a sample and video illustration for your reference. In order to assist us in identifying the problem and provide a better solution, we kindly request that you provide additional details about the issue, as mentioned below:
- A simple, runnable sample that illustrates the issue you are experiencing (or modify the shared sample as per your scenario).
- Issue replication steps.
- A video illustration of the issue.
|
<div style="margin:130px auto;width:300px"> @if (MultiVal != null) { @foreach (var SelectedValue in MultiVal) { <p>MultiSelect value is:<strong>@SelectedValue</strong></p> } } <SfMultiSelect TItem="Country" TValue="int[]" Placeholder="e.g. Australia" @bind-Value="@MultiVal" DataSource="@Countries"> <MultiSelectFieldSettings Text="Name" Value="Code"></MultiSelectFieldSettings> </SfMultiSelect> <button @onclick="Update">Bind Value to MultiSelect</button> </div>
@code {
public int[] MultiVal { get; set; } = new int[] { 1 };
public class Country { public string Name { get; set; }
public int Code { get; set; } }
public void Update() { MultiVal = new int[] { 1, 2, 3 }; } List<Country> Countries = new List<Country> { new Country() { Name = "Australia", Code = 1 }, new Country() { Name = "Bermuda", Code = 2 }, new Country() { Name = "Canada", Code = 3 }, new Country() { Name = "Cameroon", Code = 4 }, }; } |
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorServerApp490905865
Regards,
Udhaya Kumar D
Thanks for the response.
As you can see from our code, we are doing very similar but the not setting the value of the multiselect but they the datasource has a
Hi Alex,
As mentioned earlier, we kindly request that you provide additional details about the issue, as stated below:
- A description of the specific scenario in which you are experiencing the issue.
- A runnable sample that demonstrates the issue, or a modified version of the previously shared sample that reflects your specific scenario.
- Detailed replication steps that we can follow to reproduce the issue.
- A video illustration of the issue.
This information will be very helpful in helping us resolve your issue as quickly and efficiently as possible.
- 3 Replies
- 2 Participants
-
AL Alex
- May 10, 2023 06:05 PM UTC
- May 16, 2023 05:15 AM UTC