Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

An error occurred when using change event in radzen blazor

$
0
0
<RadzenDropDown Data="ClassOption" @bind-Value="selectedClass"        Name="class" Change="@(args => onClassChange((int)args))" />

I'm using this event in RadzenDropDown component but an error occurred and it says

The delegate type could not be inferred

This is the onClassChange function:

private void onClassChange(int value){    selectedClass = value;    if (classCapacityMap.TryGetValue(selectedClass, out int cap))    {        capacity = cap;    }    else    {        capacity = 0;    }}

I was using this exact event handler the day before and it worked just fine, but when I closed and reopened the project, an error suddenly appeared.

I didn't change anything and I don't know what might be wrong here.


Viewing all articles
Browse latest Browse all 4839

Trending Articles