We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Numeric Textbox Doesn't Bind to anything other than Object

I'm unable to bind the numeric textbox to anything other than an object.

Can you please provide an example of how to properly implement this?

1 Reply

BC Berly Christopher Syncfusion Team July 18, 2019 08:15 AM UTC

Hi Ozzie,   
Greetings from Syncfusion support.   
We suggest you to use the numeric value property as object type if you want to use two-way binding in the NumericTextbox. However, if you are using one-way binding, you can specify any type for Value property. Also, we are planning to provide particular types (int, decimal) in our upcoming release to value assets and this support will be included by the end of July 2019. We appreciate your patience until then.    
Please find the code snippet for two-way bind below.   
<p>NumericTextBox valus is: @NumericValue</p>   
<EjsNumericTextBox @bind-Value="@NumericValue"></EjsNumericTextBox>   
@code {   
    public object NumericValue { getset; } = 10;   

We have prepared a sample and attached below.   
Berly B.C   

Live Chat Icon For mobile
Up arrow icon