Error: System.TypeLoadException: Could not load type 'Syncfusion.Blazor.DropDowns.DropDownListEvents`1' from assembly 'Syncfusion.Blazor, Version=18.3.0.40

Hi,
I was using this SfDropdownlist like this in last version:
<SfDropDownList Placeholder="Select an item..." ShowClearButton="true" Width="100%" TValue="string" TItem="SilverBlazorComboBoxModel" @bind-Value="Value" DataSource="@ComboList" CssClass="@(!isValid? "invalid": "")">                    <DropDownListEvents ValueChange="ComboBoxItemSelected" TValue="string"></DropDownListEvents>                    <DropDownListFieldSettings Value="ComboValue" Text="ComboText"></DropDownListFieldSettings>                </SfDropDownList>

async Task ComboBoxItemSelected(Syncfusion.Blazor.DropDowns.ChangeEventArgs<stringargs)
{
    if (args != null)
    {
        //Do Work...
    }
}
 and it worked find after this new patch i get an error while loading 


[2020-10-19T10:36:04.964Z] Error: System.TypeLoadException: Could not load type 'Syncfusion.Blazor.DropDowns.DropDownListEvents`1' from assembly 'Syncfusion.Blazor, Version=18.3.0.40, Culture=neutral, PublicKeyToken=null'.
   at Silver.Blazor.Components.LookupInput.<BuildRenderTree>b__0_3(RenderTreeBuilder __builder2)
   at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
   at Syncfusion.Blazor.DropDowns.SfDropDownList`2.<BuildRenderTree>b__463_0(RenderTreeBuilder __builder2)
   at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
   at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()


It seems that there is a problem with the DropDownListEvents. I also noticed that there is't enough documentation about this feature in the dropdownlist category anymore. 
How can i fix this issue?




1 Reply 1 reply marked as answer

BC Berly Christopher Syncfusion Team October 20, 2020 10:54 AM UTC

Hi Andre, 
  
Greetings from Syncfusion support.  
  
We would like to inform you that, we have introduced some breaking changes in the DropDownList component. We have documented that information in the below mentioned release notes.   
  
  
You have to set the TItem in the DownDownListEvents taghelper as well as Change event arguments to get rid of the reported issue. Refer to the below code and sample.  
  
<SfDropDownList Placeholder="Select an item..." ShowClearButton="true" Width="100%" TValue="string" TItem="SilverBlazorComboBoxModel" @bind-Value="Value" DataSource="@ComboList"> 
    <DropDownListEvents ValueChange="ComboBoxItemSelected" TItem="SilverBlazorComboBoxModel" TValue="string"></DropDownListEvents> 
    <DropDownListFieldSettings Value="ComboValue" Text="ComboText"></DropDownListFieldSettings> 
</SfDropDownList> 
@code{ 
   async Task ComboBoxItemSelected(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, SilverBlazorComboBoxModel> args) 
    { 
        //if (args != null) 
        //{ 
        //    //Do Work... 
        //} 
    } 
} 

  
Please check the above sample and get back to us if you need further assistance.  
  
Regards,   
Berly B C  


Marked as answer
Loader.
Up arrow icon