ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: mlyons on February 03, 2017, 01:27:47 am

Title: Negative Number Support
Post by: mlyons on February 03, 2017, 01:27:47 am
If I set the DataType on the ColumnModel to float it won't let me enter negative numbers.  Is there a way around this without using RegEx?
Title: Re: Negative Number Support
Post by: paramvir on February 03, 2017, 10:30:19 pm
negative numbers can be entered when dataType is either "float" or "integer".

Example: Freight column in https://paramquery.com/demos/editing_custom

Just remove the validation:
Code: [Select]
validations: [{ type: 'gte', value: 1, msg: "should be >= 1"}],
Title: Re: Negative Number Support
Post by: mlyons on February 04, 2017, 01:02:16 am
The issue isn't only the validation.  If I want to enter "-100",  I have to enter in the "100" and then backspace to the beginning and add the "-".  I can't start out by typing the "-" first.  Is there a way around this?
Title: Re: Negative Number Support
Post by: mlyons on February 08, 2017, 08:37:56 pm
Is this the expected behavior with your grid?
Title: Re: Negative Number Support
Post by: paramvir on February 08, 2017, 09:38:10 pm
You may need to upgrade to v2.2.0

I can enter "-" first in Freight column in this example: https://paramquery.com/demos/editing_custom
Title: Re: Negative Number Support
Post by: mlyons on February 14, 2017, 10:42:31 am
RESOLVED - with upgrade

I found that with the free version of the grid, I could enter the negative if I typed fast.  If I hit the "-" and then waited a breath before typing a numeral it removed the negative.  If I typed fast enough it worked.

We upgraded to the pro version and with no code changes everything started working correctly as in your demos.
Title: Re: Negative Number Support
Post by: Roaming on April 15, 2017, 01:18:32 pm
That's a peculiar phenomenon. I haven't encountered. Negative number is also normally appearence.Could you copy your code here?