Articles in this section
Category / Section

How to display empty string in WinForms IntegerTextBox when databound value is null?

1 min read

Display empty string

We can display empty string when databound value is null. For this we need to bind the editor controls (like IntegerTextBox, DoubleTextBox, etc.,) to BindableValue property and also, we need to set UseNullString to true and NullString property to empty string.

C#

this.integerTextBox1.NullString = "";
this.integerTextBox1.UseNullString = true;
this.integerTextBox1.DataBindings.Add("BindableValue", boundView, "IntegerField");

VB

Me.integerTextBox1.NullString = ""
Me.integerTextBox1.UseNullString = True
Me.integerTextBox1.DataBindings.Add("BindableValue", boundView, "IntegerField")

Reference link: https://help.syncfusion.com/windowsforms/integer-textbox/displaysettings#null-value-settings

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied