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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to set Integer/double textbox controls to DBNull

Thread ID:

Created:

Updated:

Platform:

Replies:

8382 Nov 4,2003 04:07 PM UTC Nov 6,2003 10:15 AM UTC WinForms 4
loading
Tags: Tools
Administrator [Syncfusion]
Asked On November 4, 2003 04:07 PM UTC

Is there any way to set integer/double textbox to DBNull? Integer/Double textbox controls assumes that the value 0 is NullString. But in reality a numeric column can contain NULL value. There is also another issue with these controls related to the above mentioned problem. These controls are always intialized to have a value 0. Is there a way to override this behaviour (ie not to have any value on screen if it is null)?

Administrator [Syncfusion]
Replied On November 4, 2003 08:59 PM UTC

Hi Rajeev, Presently the DoubleTextBox and IntegerTextBox controls cannot handle DBNull value and they assume 0 to be the Null value. However, we have considered this as a feature request for implementation in a future release of Essential Suite. Please open an incident in DirectTrac regarding this issue and I will update you when this is accomplished. In order to set the values of the DoubleTextBox and IntegerTextBox to a null value you could set the Text property values to null as shown below : this.doubleTextBox1.Text = null; this.integerTextBox1.Text = null; In order to prevent 0 being displayed when the values are set to null, please set the following properties : this.doubleTextBox1.NullString = ""; this.doubleTextBox1.UseNullString = true; this.integerTextBox1.NullString = ""; this.integerTextBox1.UseNullString = true; I have also attached a sample application here which shows how this can be done. Thanks for your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Rajeev Kulam
Replied On November 5, 2003 01:51 PM UTC

Thanks. The controls now doesn't display 0 by default. But I still find a problem with this. It doesn't allow me to enter 0 (or show )in to these fields. As you know 0 is a valid value. How could I force these controls to display 0 when user enters it. Thanks > Hi Rajeev, > > Presently the DoubleTextBox and IntegerTextBox controls cannot handle DBNull value and they assume 0 to be the Null value. However, we have considered this as a feature request for implementation in a future release of Essential Suite. Please open an incident in DirectTrac regarding this issue and I will update you when this is accomplished. > > In order to set the values of the DoubleTextBox and IntegerTextBox to a null value you could set the Text property values to null as shown below : > this.doubleTextBox1.Text = null; > this.integerTextBox1.Text = null; > > In order to prevent 0 being displayed when the values are set to null, please set the following properties : > this.doubleTextBox1.NullString = ""; > this.doubleTextBox1.UseNullString = true; > > this.integerTextBox1.NullString = ""; > this.integerTextBox1.UseNullString = true; > > I have also attached a sample application here which shows how this can be done. Thanks for your patience and cooperation. > > Regards, > Guru Patwal > Syncfusion, Inc.

Administrator [Syncfusion]
Replied On November 5, 2003 01:51 PM UTC

Thanks. The controls now doesn't display 0 by default. But I still find a problem with this. It doesn't allow me to enter 0 (or show )in to these fields. As you know 0 is a valid value. How could I force these controls to display 0 when user enters it. Thanks > Hi Rajeev, > > Presently the DoubleTextBox and IntegerTextBox controls cannot handle DBNull value and they assume 0 to be the Null value. However, we have considered this as a feature request for implementation in a future release of Essential Suite. Please open an incident in DirectTrac regarding this issue and I will update you when this is accomplished. > > In order to set the values of the DoubleTextBox and IntegerTextBox to a null value you could set the Text property values to null as shown below : > this.doubleTextBox1.Text = null; > this.integerTextBox1.Text = null; > > In order to prevent 0 being displayed when the values are set to null, please set the following properties : > this.doubleTextBox1.NullString = ""; > this.doubleTextBox1.UseNullString = true; > > this.integerTextBox1.NullString = ""; > this.integerTextBox1.UseNullString = true; > > I have also attached a sample application here which shows how this can be done. Thanks for your patience and cooperation. > > Regards, > Guru Patwal > Syncfusion, Inc.

Administrator [Syncfusion]
Replied On November 6, 2003 10:15 AM UTC

Hi Rajeev, Thanks for bringing this to our notice. I could observe the above mentioned behavior here. I have contacted the Essential Development Team for their inputs on this issue, and will update you as soon as I hear from them. Thanks for your patience. Regards, Guru Patwal Syncfusion, Inc.

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.

Warning Icon 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.Close Icon

;