Hi.
When can we expect that se can use @bind-value to a Guid or object for autocomplete, dropdown and multiselect?
Since now the controls are useless.
Best regards!
Greetings from Syncfusion support.
You can bind Guid type values using @bind-value property as mentioned in the below code snippet.
[counter.razor]
|
@using Syncfusion.Blazor.DropDowns
<SfAutoComplete TValue="Guid?" Placeholder="e.g. Australia" TItem="Countries" @bind-Value="@DropVal" DataSource="@Country"> <AutoCompleteFieldSettings Value="ID" Text="ID"></AutoCompleteFieldSettings> </SfAutoComplete> <br /> <br /> <SfDropDownList TValue="Guid?" Placeholder="e.g. Australia" TItem="Countries" @bind-Value="@DropVal" DataSource="@Country"> <DropDownListFieldSettings Value="ID" Text="ID"></DropDownListFieldSettings> </SfDropDownList> <br> <br /> <SfMultiSelect TValue="Guid?[]" Placeholder="e.g. Australia" TItem="Countries" @bind-Value="@DropVal1" DataSource="@Country"> <MultiSelectFieldSettings Value="ID" Text="ID"></MultiSelectFieldSettings> </SfMultiSelect>
|
You can bind object type values using @bind-value property as mentioned in the below code snippet.
[Index.razor]
|
@using Syncfusion.Blazor.DropDowns <SfDropDownList TValue="Countries1" TItem="Countries1" @bind-Value="@ddlValue2" Placeholder="Select a country" DataSource="@Country1"> <DropDownListFieldSettings Text="Name" Value="Code"></DropDownListFieldSettings> </SfDropDownList> <br> <SfMultiSelect TValue="List<Countries>" TItem="Countries" @bind-Value="@MultiValue" Placeholder="Select a country" DataSource="@Country"> <MultiSelectFieldSettings Text="Name" Value="Code"></MultiSelectFieldSettings> </SfMultiSelect>
|
Currently we are facing issue when binding complex value to Auto complete component, the fix for this issue will be available in the patch release expected on April 12th 2022. You can track the status of the issue through the following feedback link
Also we have attached working
sample for your reference. Let us know if you have any concerns in the above
the solution.
Thanks,
Mohanraj M
We are glad to announce that the fix for the reported issue has been implemented in the weekly patch release 20.1.52. We request you to update the NuGet to the latest version to get rid of this issue.
Find the release notes here: https://blazor.syncfusion.com/documentation/release-notes/20.1.51?type=all#autocomplete