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.
Syncfusion Feedback

DoubleTextBox NULL vs. Zero

Thread ID:

Created:

Updated:

Platform:

Replies:

60587 May 8,2007 03:37 PM UTC Aug 12,2008 12:12 PM UTC Windows Forms 14
loading
Tags: Tools
Mark Atkinson
Asked On May 8, 2007 03:37 PM UTC

Is it possible to differentiate between NULL and zero in a DoubleTextBox that is bound to a data source?
It seems I can display either the NullString property value or the number but I'd like to display my NullString property value when the underlying data value is NULL and I'd like to display zero ("0") when the underlying data value is, in fact, zero.
Coming at a different angle: databases can differentiate between zero and NULL, can the DoubleTextBox?

Rajesh C [Syncfusion]
Replied On May 9, 2007 04:13 AM UTC

Hi Mark,

Thank you for using Syncfusion products.

It is possible to differentiate between NULL and zero in a DoubleTextBox by using UseNullString and NullString properties, Please refer to the following code snippet.
[ C# ]

this.doubleTextBox1.UseNullString = true;
this.doubleTextBox1.NullString = " ";

The Null and Zero will be displayed as shown in below.

Null equal to " "
Zero equal to "0.00"

Please let me know if you have any queries.

Regards,
Rajesh C

Mark Atkinson
Replied On May 9, 2007 02:26 PM UTC

That's what I have (pretty much).

NullString = string.Empty;
UseNullString = true;

Does it make a difference if the NullString is blank vs. a space?

>Hi Mark,

Thank you for using Syncfusion products.

It is possible to differentiate between NULL and zero in a DoubleTextBox by using UseNullString and NullString properties, Please refer to the following code snippet.
[ C# ]

this.doubleTextBox1.UseNullString = true;
this.doubleTextBox1.NullString = " ";

The Null and Zero will be displayed as shown in below.

Null equal to " "
Zero equal to "0.00"

Please let me know if you have any queries.

Regards,
Rajesh C

Mark Atkinson
Replied On May 9, 2007 06:13 PM UTC

I'm able to reproduce my issue in your samples.
If I change the DoubleEditBox demo to use:
UseNullString = true
NullString = " "

then, when I type a 0 into the text box, the control won't take it and just show a space. I'm trying to enter the value 0 but the control keeps showing the null string.


Rajesh C [Syncfusion]
Replied On May 9, 2007 09:02 PM UTC

Hi Mark,

Thanks for the update. String.Empty and space are different. But you can use any either of them to differentiate the NULL and zero.

Please let me know if you have any other queries.

Regards,
Rajesh C

Mark Atkinson
Replied On May 9, 2007 10:48 PM UTC

I can reproduce the issue consistently in your Sample Browser. I'm using the 4.4 libraries.

Repro steps:
1) Open the DoubleTextBox sample
2) Set the NullString property to " "
3) Set the UseNullString property to True
4) In the control type '0' (quotes mine)

Actual behaviour: Typing in '0' doesn't display 0 in the control, the control contains an empty space (the NullString value)
Possible Expected behaviour: The control should display what was typed in. the '0' character


>Hi Mark,

Thanks for the update. String.Empty and space are different. But you can use any either of them to differentiate the NULL and zero.

Please let me know if you have any other queries.

Regards,
Rajesh C

Poly J [Syncfusion]
Replied On May 10, 2007 12:00 PM UTC

Hi Mark,

I am able to see this issue in 4.4 version. We have fixed this issue in our latest version. The latest version of Essential Studio - v5.1.0.51 is available for download from the below location.

http://www.syncfusion.com/downloads/latestversion/default.aspx


Regards,
Poly


Mark Atkinson
Replied On June 29, 2007 04:26 PM UTC

This is still not working in 5.1. I can still repro it in the TextBox Demo
To summarize, I'd like to be able to show NULL values (as blank, or space or whatever) and be able to type in the value 0. However, when the UseNullString is set to true, it's impossible for a user to type in 0. The control will just display the NULL string.
I don't want the NullString to be "0" because that gives the impression that the data bound to the control might actually contain "0" when, in fact, it is NULL.


>Hi Mark,

I am able to see this issue in 4.4 version. We have fixed this issue in our latest version. The latest version of Essential Studio - v5.1.0.51 is available for download from the below location.

http://www.syncfusion.com/downloads/latestversion/default.aspx


Regards,
Poly


Golda Rebecal [Syncfusion]
Replied On July 2, 2007 02:34 PM UTC

Hi Mark,

I am afraid that I am not able to reproduce the issue of zero not being displayed in DoubleTextBox if the UseNullStringString = true & NullString = "" in v5.1.

Could you please modify the attached sample so that the issue could be reproduced? This will help us to resolve the issue soon.

http://websamples.syncfusion.com/samples/tools.Windows/F60587/main.htm

Best regards,
Golda

Mark Atkinson
Replied On July 6, 2007 05:20 PM UTC

I'm unable to repro the bug in your sample here but I was able to repro it in the TextBoxDemo in the provided samples.
I'll have a closer look on my end.

thanks,
Mark

>Hi Mark,

I am afraid that I am not able to reproduce the issue of zero not being displayed in DoubleTextBox if the UseNullStringString = true & NullString = "" in v5.1.

Could you please modify the attached sample so that the issue could be reproduced? This will help us to resolve the issue soon.

http://websamples.syncfusion.com/samples/tools.Windows/F60587/main.htm

Best regards,
Golda

JayaLakshmi [Syncfusion]
Replied On July 11, 2007 04:51 AM UTC

Hi Mark,

I am afraid that I am not able to reproduce the issue you specified in TextBoxDemoSample.

I have tried the following settings in both designer and code editor of TextBoxDemoSample.

UseNullStringString = true and NullString = ""

Could you please try to reproduce in the below sample ?

http://websamples.syncfusion.com/samples/Tools.Windows/F60587_new/main.htm

Kindly let me know whether you have added any additional code snippet other than the above settings that would help us to approach this issue much better.

Thanks for your patience.

Regards,
Jaya

Mark Atkinson
Replied On September 19, 2007 04:32 PM UTC

OK, we've updated to 5.2 libraries and we're still having this problem. I'm able to repro the bug in your sample below as well.
to repro, go into the code and change the properties of intTotalBillTextBox like this:

this.intTotalBillTextBox.NullString = "";
this.intTotalBillTextBox.UseNullString = true;

Run the project and try to type in 0 for that control. I would expect to be able to set the value to 0 but when I type it in, nopthng gets displayed.

>Hi Mark,

I am afraid that I am not able to reproduce the issue you specified in TextBoxDemoSample.

I have tried the following settings in both designer and code editor of TextBoxDemoSample.

UseNullStringString = true and NullString = ""

Could you please try to reproduce in the below sample ?

http://websamples.syncfusion.com/samples/Tools.Windows/F60587_new/main.htm

Kindly let me know whether you have added any additional code snippet other than the above settings that would help us to approach this issue much better.

Thanks for your patience.

Regards,
Jaya

Administrator [Syncfusion]
Replied On September 24, 2007 08:37 AM UTC

Hi Mark,

Thank you for bringing this issue to our notice.

Could you please open a DirectTrac incident with subject line "Zero is not displayed when UseNullString and NullString were set- F68374'. We will send you the bug fix details through our DirectTrac system.

Regards,
Jaya

Vladislav Sergeev
Replied On August 7, 2008 03:31 PM UTC

Hello there!

I have the same issue (using 6.2.0.40). Has there been any progress on DoubleTextBox null vs. string.Empty?

Thanks



Administrator [Syncfusion]
Replied On August 12, 2008 12:12 PM UTC

Hi Vladislav,

Sorry for the delay.

The issue with doubleTextBox "Not possible to differentiate between NULL and zero in a DoubleTextBox that is bound to a data source" which reported in this mail thread is fixed in our latest version 6.3.0.30 .

Please refer the sample:
http://websamples.syncfusion.com/samples/Tools.Windows/F60587_1/main.htm


Please let me know if any concerns.

Regards,
Hema





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

;