Hi all,
I am using a DropDownDataGrid. It has worked well with no issues. Recently, I enabled the "DisabledProperty." The property works as expected and when I have an item set as disabled it shows as disabled in the DropDown.
However, whenever I clear the selection using the "clear" button or delete key to a NullReferenceException is thrown. If I remove the "DisabledProperty" from the DropDownDataGrid it works as expected with no errors.
Any tips? Here is the exception stack:
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.Object.lambda_method321(Closure , Object )
at Radzen.DropDownBase`1.<SelectItem>d__135[[MyClass, MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Radzen.Blazor.RadzenDropDownDataGrid`1.<OnRowSelect>d__198[[MyClass, MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Radzen.Blazor.RadzenDataGrid`1.<OnRowSelect>d__568[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at Radzen.Blazor.RadzenDataGrid`1.<SelectRow>d__569[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at Radzen.Blazor.RadzenDropDownDataGrid`1.<Clear>d__167[[MyClass, MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Here is the item definition:
<CustomRadzenDropDownDG class="w-100" @bind-Value=@Value Data=@SourceObjects @key=@SourcePins TextProperty="Name" TValue="MyClass" Disabled=@IsDisabled AllowRowSelectOnRowClick="true" Multiple="false"
DisabledProperty="PinDisabled" AllowColumnResize="false" AllowFilteringByAllStringColumns="false" AllowSorting="false" AllowVirtualization="true" AllowSelectAll="false" AllowFiltering="false" AllowClear="true">
I can't share code unfortunately but if that doesn't signal anything obvious I can try to reproduce from scratch.