Problem with RadzenDropDown

Good morning.
I'm doing some tests to see how your components work, but I'm experiencing a problem and I can't find what I'm doing wrong.

This is my Page

@page "/test"

<RadzenDropDown AllowClear="true" 
    TValue="string" AllowVirtualization="true" Class="w-100" 
                    AllowFiltering="true"
                    Data=@l_customers 
                    TextProperty="CompanyName" 
                    ValueProperty="CustomerID" />


@code {

    List<customers> l_customers;

    public class customers{
        public string CustomerID  { get; set; }
        public string CompanyName  { get; set; }
    }


    protected override async Task OnParametersSetAsync()
    {
        l_customers = new();
        l_customers.Add(new customers() { CustomerID = "0", CompanyName = "AGRARIO" });
        l_customers.Add(new customers() { CustomerID = "1", CompanyName = "PEPE" });

        StateHasChanged();

    }

}

When i wrote somehithng in the dropbox i get this exception:
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Linq.Dynamic.Core.Parser.KeywordsHelper..ctor(ParsingConfig config)
at System.Linq.Dynamic.Core.Parser.ExpressionParser..ctor(ParameterExpression[] parameters, String expression, Object[] values, ParsingConfig parsingConfig)
at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(Type delegateType, ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values)
at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values)
at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(ParsingConfig parsingConfig, Boolean createParameterCtor, Type itType, Type resultType, String expression, Object[] values)
at System.Linq.Dynamic.Core.DynamicQueryableExtensions.Where(IQueryable source, ParsingConfig config, String predicate, Object[] args)
at System.Linq.Dynamic.Core.DynamicQueryableExtensions.Where(IQueryable source, String predicate, Object[] args)
at Radzen.DropDownBase1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_View() at Radzen.DropDownBase1.d__3[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].BuildRenderTree(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

Can Anyone tell me what im doing wrong ?

Hi @Javier1,

Which version are you using? I tried your exact code with the latest version (3.18.12) and it seems to work as expected. Here is a short animated gif that I recorded:

dropdown

Hi ¡ Thanks for the quick support.

Im using 3.18.12 from nuget package.

I try it on Chrome and give and exception

My App is on WebAssembly.

Im going to do another new project for test .. because it should work :frowning:

Edit -> In the end I have made a new project, started from 0 and it keeps throwing me the same exception in Chrome.

I try to unistall and install Chrome , and i try it in another computers and same excection

I finally found the problem. In my project I have referenced a Dll made in Net6, where I have certain functionalities shared between several projects.

It is to add the reference to this dll and the component stops working. On the other hand if instead of referencing the Dll I add it as a Nuget everything seems to work correctly.

I do not understand how this can affect the behavior of the component, although I am sure that there is some reason :slight_smile: