Get save value checked.

Hello,


I used the Multiselection dropdown. Bind from the database. after saving value on edit mode I have to check those values that I save last.

<SfMultiSelect TValue="string[]" @bind-Value="@values" AllowFiltering="true" TItem="SalonServicesObject" Mode="@VisualMode.CheckBox" Placeholder="Select a Services" DataSource="@TreeData" ShowSelectAll="true"

                                               EnableSelectionOrder="false" FilterBarPlaceholder="Search Services" EnableGroupCheckBox="true" PopupHeight="350px">

                                    <MultiSelectFieldSettings GroupBy="CategoryName" Text="ServiceName" Value="ServiceId"></MultiSelectFieldSettings>

                                </SfMultiSelect>


1 Reply

BC Berly Christopher Syncfusion Team August 16, 2021 11:39 AM UTC

Hi Sanket, 
  
Greetings from Syncfusion support. 
  
We can get the selected values in the MultiSelect component with help of Value property through the component instance else bind-value attribute as mentioned below. 
  
  public void BtnClick() 
    { 
        var value = this.multiObj.Value; 
        var MultiVal = values; 
    } 
 
  
Else, you can get the selected item dynamically from the OnValueSelect event arguments as mentioned below. 
  
    public void OnSelect(SelectEventArgs<SalonServicesObject> args) 
    { 
        var selectedValue = args.ItemData.ServiceName; 
    } 
 
  
Please find the sample from the below link. 
  
If we misunderstood your query, please share more details that will help us to check and proceed further from our end. 
  
·       Have you faced this issue inside the Grid component? 
·       Any video demonstration for the issue 
·       Modify the attached sample with reported issue else share simple issue replicating sample 
  
Regards, 
Berly B.C 


Loader.
Up arrow icon