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.

How to display a null value in the editors when the databound value is null?

To display a null value when the databound value of the editor is null, set the UseNullOption property to True.

UseNullOption:

The UseNullOption is a Boolean property of the Editors like CurrencyTextBox, IntegerTextBox, DoubleTextBox, PercentTextBox that is used to display a null value when the databound value is null according to its values such as True or False.

When the value of UseNullOption is set to True, it is used to display a databound null Value, instead of the default value.

When the value of UseNullOption is set to False, it disables the Null value and display the default value zero for the control.

Here is an example that describes the use of a UseNullOption property in IntegerTextBox. Refer to the following code example.

XAML

 

C#

 

The following screenshot displays the Null value when the UseNullOption property is set to True for an IntegerTextBox.

XAML

 

C#

 

The following screenshot displays the default value Zero when the UseNullOption property is set to False for an IntegerTextBox

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
4361 04/14/2015 04/14/2015 Silverlight DoubleTextBox 4.5.1 12.4.0.24
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.