RadzenUpload + RadzenProgressBar don't work together

So I have a file Upload and want to show the progress in the progress bar. The problem is, that the OnProgress event writes a double value to the progress variable, while the ProgressBar requests an int-type value.

<div class="row">
    <div class="col-md-4">
        <RadzenUpload Url="upload/single" Style="margin-bottom: 20px;"
                      Progress=@(args => OnProgress(args, "Single file upload")) ChooseText="Datei hochladen...">
        </RadzenUpload>
    </div>
    <div class="col-md-4">
        <h3>File-Upload</h3>
        <RadzenProgressBar @bind-value="progress" Style="margin-bottom: 20px" />
    </div>
    <div class="col-md-4">

    </div>
</div>


@code{
   int progress;

 void OnProgress(UploadProgressArgs args, string name)
    {
        this.progress = args.Progress;      
    }
}

Which results to:

InvalidOperationException: Unable to set property 'value' on object of type 'Radzen.Blazor.RadzenProgressBar'. The error was: Unable to cast object of type 'System.Int32' to type 'System.Double'.

Maybe you can convert the value to int?

Hi @Kurt,

The Value property of the RadzenProgressBar accepts double arguments. Change the type of the progress field to double.

I tried this: Bound a new double value to the progress bar:

<RadzenProgressBar @bind-value="progress2" Style="margin-bottom: 20px" />

and retured the converted int value:

 int progress;
    double progress2 {
        get
        {
            return Convert.ToDouble(progress);
        }
        set { }
    }

Which leads to:

InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback1[System.Double]' to type 'System.Action1[System.Double]'.

But if i change progress from int to double, i get that bad boy here:

System.InvalidOperationException: Unable to set property 'valueChanged' on object of type 'Radzen.Blazor.RadzenProgressBar'. The error was: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback1[System.Double]' to type 'System.Action1[System.Double]'.

OK I think I found the problem. When progress was an int type, I received compile errors when i used @bind-Value in the progress bar (with an uppercase v). So I changed it to @bind-value="progress", which compiled but threw the above errors. After changing progress to double and bind-Value back to uppercase V, it worked.

<RadzenProgressBar @bind-Value="progress" Style="margin-bottom: 20px" />

But, on a different note: When i upload the file, i post the file object to a controller. I read the excel file and transfer its content to a database , which takes about 6 to 8 seconds. I would like to provide a progress bar for the file upload (which now works) and for the transfer to the DB. So I need to send back frequent progress updates from the controller, which performs the db operations to the blazor app. Is that possible in any shape or form?