RadzenNumeric set bind-value to Dictionary Value in foreach

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?

@foreach (var requirement in requirements)
{
    <div class="row" style="margin-bottom: 16px">
        <div class="col-md-3">
            <RadzenLabel Text=@requirement.Key.Name />
        </div>
        <div class="col">
           <RadzenNumeric @bind-Value=@requiremnts[requirement.Key] Data=@requirement.Value/>
        </div>
    </div>
}

The problem must be me trying to bind to a dictonary value. If I set it to something like

<RadzenNumeric @bind-Value=@value />

it works...

Here is a picture of what i want: this means there are currently 4 entries inside the dictionary

What exactly is not working? Usually @bind-Value cannot be used with complex expressions but only with dot notation for subproperties.

when i run the code, I get this error:

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.

okay thank you, I just got a workarond with a List of Objects:

foreach (var roleRequirement in roleRequirements)
{

        <div class="col-md-3">
            <RadzenLabel Text=@roleRequirement.Role.Name />
        </div>
        <div class="col">
            <RadzenNumeric @bind-Value=@roleRequirement.RequiredEmployees />
        </div>
    </div>
}

This seems to work