I have a template form in which I want to add a dynamic number of RadzenNumerics. The quantity depends on the number of entries in a
public Dictionary<role, int> requirements = new();
I want to set the binding value for each numeric to the value of a dictionary entry. But this doesn´t seem to work. The important code is inside the foreach loop. Any ideas?
blazor.server.js:1 [2023-03-20T08:03:51.749Z] Error: System.ArgumentException: The provided expression contains a InstanceMethodCallExpression1 which is not supported. FieldIdentifier only supports simple member accessors (fields, properties) of an object.
at Microsoft.AspNetCore.Components.Forms.FieldIdentifier.ParseAccessor[T](Expression1 accessor, Object& model, String& fieldName) at Microsoft.AspNetCore.Components.Forms.FieldIdentifier.Create[TField](Expression1 accessor)
at Radzen.FormComponent1.SetParametersAsync(ParameterView parameters) at Radzen.Blazor.RadzenNumeric1.<>n__0(ParameterView parameters)
at Radzen.Blazor.RadzenNumeric`1.SetParametersAsync(ParameterView parameters)
Yes, this is what I've wrote in my previous reply. You cannot use complex expression for @bind-Value. This is not something related to Radzen Blazor components but for Blazor framework in general.