Binding with nullable int doesnot work

Hi,
I have a requirement where I need to bind the numericupdown control to a nullable int. When tried with int? , binding doesnot work. 
How can I make use of the allownull property to bind this to a nullable integer value?

3 Replies

SK Selva Kumar  Veerakrishnan Syncfusion Team December 13, 2017 12:19 PM UTC

Hi Samir,


Thank you for contacting Syncfusion support.


We can able to bind nullable int value of SfNumericUpDown by using IValueConverter. We have prepared a sample for your reference, please download it from the link given below.


Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/NumericTextBoxTest_2_2_2-1268854514.zip


If the sample does not meet your requirement, please update us with more details about this query.


Note: We got the same behaviour for Entry control of Xamarin when binded to a nullable double without using IValueConverter and we got the same as like in SfNumericUpDown. So for binding a nullable value in Xamarin using IValueConverter seems to do it. We have also done some research and found similar case in the below given StackOverFlow link.


https://stackoverflow.com/questions/42699670/entry-binding-to-int-in-xamarin-forms  


Regards,

Selva Kumar V.


SA Samir Asaf December 15, 2017 10:17 AM UTC

Hi,
Thanks for the solution. It works as per my requirement.


SK Selva Kumar  Veerakrishnan Syncfusion Team December 18, 2017 04:14 AM UTC

Hi Samir,

Thanks for your response.

Please let us know if you need any further assistance on this.

Regards,

Selva Kumar V.

Loader.
Up arrow icon