RadzenDropDown NullReferenceException #1920

Closed
opened 2026-01-29 18:15:38 +00:00 by claunia · 1 comment
Owner

Originally created by @Igor-9309 on GitHub (Dec 8, 2025).

Image

The error occurs when I press CTRL+A to select everything and then delete the field in the RadzenDropDown.

<RadzenDropDown TValue="int"
AllowClear="true"
Data="@Employees"
TextProperty="Identifier"
ValueProperty="Id"
Name="Employee"
@bind-Value=@LoginModel.Id

<RadzenDropDown TValue="int"
AllowClear="true"
Data="@Employees"
TextProperty="Identifier"
ValueProperty="Id"
Name="Employee"
@bind-Value=@LoginModel.Id

Radzen.Blazor.dll!Radzen.DropDownBase<int>.SelectItem(object item, bool raiseChange) Line 1200	C#
Radzen.Blazor.dll!Radzen.Blazor.RadzenDropDown<int>.OnSelectItem(object item, bool isFromKey) Line 379	C#
Radzen.Blazor.dll!Radzen.DropDownBase<int>.HandleKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange) Line 734	C#
Radzen.Blazor.dll!Radzen.Blazor.RadzenDropDown<int>.HandleKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange) Line 350	C#
Radzen.Blazor.dll!Radzen.DropDownBase<int>.OnKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool? shouldSelectOnChange) Line 864	C#
Radzen.Blazor.dll!Radzen.Blazor.RadzenDropDown<int>.BuildRenderTree.AnonymousMethod__93_1(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args) Line 12	C#
System.Private.CoreLib.dll!System.Reflection.MethodBaseInvoker.InvokeWithOneArg(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) Line 117	C#
System.Private.CoreLib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 465	C#
System.Private.CoreLib.dll!System.MulticastDelegate.DynamicInvokeImpl(object[] args) Line 38	C#
System.Private.CoreLib.dll!System.Delegate.DynamicInvoke(object[] args) Line 655	C#
Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync<object>(System.MulticastDelegate delegate, object arg) Line 64	C#
Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync(object arg) Line 36	C#
Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) Line 379	C#
Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(object arg) Line 60	C#
Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs, bool waitForQuiescence) Line 475	C#
Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs) Line 411	C#
Microsoft.AspNetCore.Components.Web.dll!Microsoft.AspNetCore.Components.RenderTree.WebRenderer.WebRendererInteropMethods.DispatchEventAsync(System.Text.Json.JsonElement eventDescriptor, System.Text.Json.JsonElement eventArgs)	Unknown
System.Private.CoreLib.dll!System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) Line 147	C#
Microsoft.JSInterop.dll!Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo callInfo, Microsoft.JSInterop.Infrastructure.IDotNetObjectReference objectReference, string argsJson)	Unknown
Microsoft.JSInterop.dll!Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, string argsJson)	Unknown
Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.BeginInvokeDotNet.AnonymousMethod__12_0((Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo callInfo, string argsJson) state) Line 91	C#
Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule<(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo, string)>((Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo, string) state, System.Action<(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo, string)> callback) Line 55	C#
Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.BeginInvokeDotNet(string callId, string assemblyNameOrDotNetObjectId, string methodIdentifier, string argsJson) Line 87	C#
Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.__Wrapper_BeginInvokeDotNet_693418996(System.Runtime.InteropServices.JavaScript.JSMarshalerArgument* __arguments_buffer) Line 119	C#
Originally created by @Igor-9309 on GitHub (Dec 8, 2025). <img width="1500" height="494" alt="Image" src="https://github.com/user-attachments/assets/b0052bd2-4c1a-43ba-b61c-ff2e5879f391" /> The error occurs when I press CTRL+A to select everything and then delete the field in the RadzenDropDown. <RadzenDropDown TValue="int" AllowClear="true" Data="@Employees" TextProperty="Identifier" ValueProperty="Id" Name="Employee" @bind-Value=@LoginModel.Id <RadzenDropDown TValue="int" AllowClear="true" Data="@Employees" TextProperty="Identifier" ValueProperty="Id" Name="Employee" @bind-Value=@LoginModel.Id Radzen.Blazor.dll!Radzen.DropDownBase<int>.SelectItem(object item, bool raiseChange) Line 1200 C# Radzen.Blazor.dll!Radzen.Blazor.RadzenDropDown<int>.OnSelectItem(object item, bool isFromKey) Line 379 C# Radzen.Blazor.dll!Radzen.DropDownBase<int>.HandleKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange) Line 734 C# Radzen.Blazor.dll!Radzen.Blazor.RadzenDropDown<int>.HandleKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange) Line 350 C# Radzen.Blazor.dll!Radzen.DropDownBase<int>.OnKeyPress(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args, bool? shouldSelectOnChange) Line 864 C# Radzen.Blazor.dll!Radzen.Blazor.RadzenDropDown<int>.BuildRenderTree.AnonymousMethod__93_1(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs args) Line 12 C# System.Private.CoreLib.dll!System.Reflection.MethodBaseInvoker.InvokeWithOneArg(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) Line 117 C# System.Private.CoreLib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 465 C# System.Private.CoreLib.dll!System.MulticastDelegate.DynamicInvokeImpl(object[] args) Line 38 C# System.Private.CoreLib.dll!System.Delegate.DynamicInvoke(object[] args) Line 655 C# Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync<object>(System.MulticastDelegate delegate, object arg) Line 64 C# Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync(object arg) Line 36 C# Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) Line 379 C# Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(object arg) Line 60 C# Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs, bool waitForQuiescence) Line 475 C# Microsoft.AspNetCore.Components.dll!Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs) Line 411 C# Microsoft.AspNetCore.Components.Web.dll!Microsoft.AspNetCore.Components.RenderTree.WebRenderer.WebRendererInteropMethods.DispatchEventAsync(System.Text.Json.JsonElement eventDescriptor, System.Text.Json.JsonElement eventArgs) Unknown System.Private.CoreLib.dll!System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) Line 147 C# Microsoft.JSInterop.dll!Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo callInfo, Microsoft.JSInterop.Infrastructure.IDotNetObjectReference objectReference, string argsJson) Unknown Microsoft.JSInterop.dll!Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, string argsJson) Unknown Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.BeginInvokeDotNet.AnonymousMethod__12_0((Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo callInfo, string argsJson) state) Line 91 C# Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule<(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo, string)>((Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo, string) state, System.Action<(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo, string)> callback) Line 55 C# Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.BeginInvokeDotNet(string callId, string assemblyNameOrDotNetObjectId, string methodIdentifier, string argsJson) Line 87 C# Microsoft.AspNetCore.Components.WebAssembly.dll!Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.__Wrapper_BeginInvokeDotNet_693418996(System.Runtime.InteropServices.JavaScript.JSMarshalerArgument* __arguments_buffer) Line 119 C#
Author
Owner

@enchev commented on GitHub (Dec 8, 2025):

The provided code is not enough to reproduce the problem. Please use our demos (they are ediable) to replicate your case and the exception:
https://blazor.radzen.com/dropdown

@enchev commented on GitHub (Dec 8, 2025): The provided code is not enough to reproduce the problem. Please use our demos (they are ediable) to replicate your case and the exception: https://blazor.radzen.com/dropdown
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1920