Hey guys, this is a strange one. Getting this error when clicking a button to open a dialog in my grid -
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at Ampir.Pages.ViewTaxCredit.<>c__DisplayClass0_1.<BuildRenderTree>b__9(RenderTreeBuilder __builder4)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at Radzen.Blazor.RadzenGrid`1.<>c__DisplayClass0_6.<BuildRenderTree>b__39(RenderTreeBuilder __builder3)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at Radzen.Blazor.RadzenGridCell`1.<BuildRenderTree>b__0_0(RenderTreeBuilder __builder2)
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()
Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher: Error: Failed to invoke hub method 'ConnectCircuit'.
You can see the issue here -
I can use the PropertyID key without issue via an ${event} parameter on a grid row select, and as you can see in the graphic I could assign the value to 'PropID'. In fact, changing the dialog's 'data.PropertyID' parameter to use 'PropID' does work as a workaround. 'data.PropertyID' also is fine when input directly into a template field without using the template designer.
I thought this may have something to do with Radzen / EF not being able to determine a proper key when using views. In fact, Radzen tries to infer PropertyID as a dynamic data type and I have to force it to int.
Strange stuff, just wanted to let you know.
SloSuenos