RadzenTextBoz @bind-Value int error

Hi,

I have a RadzenTextBox whose @bind-value is an int value and the problem is:

  • If I leave the int value, the error is: "Cannot implicitly convert type 'int?' in 'string' "

  • If the .ToString () value is added to the int value, the errors are:

  1. "Lambda expression cannot be converted to the delegated type indicated because some of the returned types of the block cannot be implicitly converted into the return type of the delegate "
  2. "The left part of an assignment must be a variable, a property or an indexer"

Could you help me?

Thank you very much in advance.

Hi @at_extchj232,

RadzenTextBox works only with string properties (similar to the Blazor built-in InputText). You can use RadzenNumeric for integers or other numeric properties.

Perfect, thank you @korchev!

How to remove all of the arrows up down from Radzen numeric. I cannot have those in the app, but apparently now cannot use RadzenTextBox.

You can use custom CSS:

.ui-spinner-button {
  display: none;
}

How would i add the custom CCS ?

<RadzenNumeric @bind-Value="SetCode01" ReadOnly="true" Style="margin-left: 5px; width: 50px" />

You want to add custom CSS class? You can do this using class attribute.

What I did is use the RadzenNumeric element, and to remove the arrows:

::deep :is(.rz-spinner-down .rz-spinner-up) {
display: none;
}

There is a property for that: