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.


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


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

Reference link:

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