Getting error message in sfmultil select dropdown

I have used sfmulti select control in grid control. Its works fine as per our requirement. But I am getting an below error message When I focus on "sfmulti select control".Please check the attached example code and advise how to resolve this issue.


Error Message :-


Syncfusion.Blazor.DropDowns.SfMultiSelect<int[],BlazorApp1.Pages.Index.TempSize>.GetDataObject(object)' is inaccessible due to its protection level


   at CallSite.Target(Closure , CallSite , SfMultiSelect`2 , Object )


   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)


   at Syncfusion.Blazor.DropDowns.SfMultiSelect`2.GetDataByValue(TValue dataValue)


   at Syncfusion.Blazor.DropDowns.SfMultiSelect`2.InitialValueBind()


   at Syncfusion.Blazor.DropDowns.SfMultiSelect`2.OnAfterScriptRendered()


   at Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)


   at Syncfusion.Blazor.SfDataBoundComponent.OnAfterRenderAsync(Boolean firstRender)


   at Syncfusion.Blazor.DropDowns.SfMultiSelect`2.OnAfterRenderAsync(Boolean firstRender)


   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)




ScreenCast:-


https://www.screencast.com/t/SjKpf1pB











Attachment: BlazorApp1_477a4951.zip

5 Replies

BC Berly Christopher Syncfusion Team September 23, 2021 11:49 AM UTC

Hi KINS, 
  
Greetings from Syncfusion support. 
  
Thanks for sharing enough information to us. In the shared sample you have defined the TItem of the MultiSelect component is defined as protected. Due to this, the reported issue has been occurred. So, we suggest you to define the class with public to resolve the reported issue at your end. 
  
    public class TempSize 
    { 
        public int SizeID { get; set; } 
        public string SizeName { get; set; } 
    } 
 
  
Regards, 
Berly B.C 



KI KINS September 23, 2021 01:16 PM UTC

thanks working fine


but I have another issue.


Please check my comments in below screencast.






BC Berly Christopher Syncfusion Team September 24, 2021 07:18 AM UTC

Hi KINS, 
  
Thank you for the information. However, there was no screenshot in the comments. Could you please reattach it? 
  
Regards, 
Berly B.C 



KI KINS September 24, 2021 08:48 AM UTC



BC Berly Christopher Syncfusion Team September 27, 2021 10:54 AM UTC

Hi KINS, 
  
We have checked the reported issue. While opening the combobox popup, then you have called Filter method for filter the data based on value in the component. But, after changing the value you have called Filter() method again. Due to this, the popup will be keeps in the opened state. There is no necessary to call the Filter() method after changing the value in the component since you have chosen the value from the filtered result alone.  
  
So, we suggest you to remove the filter() method from the change event of the combobox component to get rid of the reported issue. Else, please share the use case requirement of calling the filter() method in the change event that will help us to check and proceed further from our end. 
  
protected void onValueChange(ChangeEventArgs<int?, TempMaterialMst> args) 
    { 
        ToolsID = comboboxObj.Value; 
       // filter(); 
    } 
 
  
Regards, 
Berly B.C 


Loader.
Up arrow icon