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.
Unfortunately, activation email could not send to your email. Please try again.

Binding Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

124910 Jul 8,2016 07:52 AM Jul 11,2016 07:58 AM Xamarin.Forms 1
loading
Tags: SfNumericTextBox
Yasahbi
Asked On July 8, 2016 07:52 AM

Hello !
I created a XAML page and a corresponding ViewModel.
But the value stay at 0.
Here's my code

XAML : 
<numeric:SfNumericTextBox Grid.Column="1"
                                Value="{Binding NombrePlace, Mode=TwoWay, Converter={StaticResource StringToInteger}}"
                                MaximumNumberDecimalDigits="0"
                                AllowNull="True"
                                Watermark="Nombre de place"
                                HorizontalOptions="Fill"
                                FontSize="15"
                                Margin="0,0,0,5"/>

View Model :

public int NombrePlace
        {
            get { return _nombrePlace; }
            set { _nombrePlace = value; }
        }
        private int _nombrePlace;

Any one know where did i made a mistake ?
Thanks ! :)

Pavendhan Kumar [Syncfusion]
Replied On July 11, 2016 07:58 AM

Hi Yasahbi,

From the provided code example, we infer that you are trying to set Null value to the NumericTextBox and binding it to the int type property so it shows 0 initially. If your requirement is to display null textbox at the startup, then the property has to be nullable field. We have created a sample to display null element initially. Please download the sample from the below mentioned link.

Link: http: //www.syncfusion.com/downloads/support/forum/124910/ze/NumericTextBoxBinding-1052995621

If your requirement is different from the above, please provide us more information or modify the sample to reproduce your reported problem. It will be convenient for us to assist you further.

Regards,
Pavendhan K
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;