Page 1 of 2
[INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Tue Oct 25, 2022 1:03 pm
by TeemuL
Hello,
When editing Grids number-type column's cell, there is inconsistency in the way I can input decimal-numbers, based on the browser I use.
Firefox:
- Comma (,) can be used as decimal delimiter
- Dot (.) can be used as decimal delimiter
Chrome
- Comma (,) can't be used as decimal delimiter (I would want to, but it's used as thousand separator it seems)
- Dot (.) can be used as decimal delimiter
I am not sure is this a browser/OS setting related thing. So if you have any clue how this should work or if there is a configuration in Grid for this, please let me know
This can be tested on https://www.bryntum.com/examples/grid/basic/, see steps on attachment picture.
- delimiter_inconsistency.jpg (54.22 KiB) Viewed 439 times
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Tue Oct 25, 2022 1:30 pm
by tasnim
Hi,
I'm not able to reproduce it. What OS and browser version are you using?
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Tue Oct 25, 2022 2:38 pm
by TeemuL
Chrome 106.0.5249.119 (Official Build) (64-bit)
Firefox 106.0.1 (64-bit)
Windows 10 Pro Version 21H2 OS build 19044.2006
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Tue Oct 25, 2022 2:44 pm
by TeemuL
Dont know if these are related but:
Windows display language: English (Finland)
Regional format: English (Finland)
Keyboard settings: English (United States), Finnish keyboard
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Tue Oct 25, 2022 4:03 pm
by alex.l
Hi TeemuL,
Thank you for the report. I've reproduced that problem. Here is a ticket to track the status https://github.com/bryntum/support/issues/5472
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Wed Oct 26, 2022 10:30 am
by TeemuL
Allright, so it looks like the Chrome works like it should and not the Firefox.
My problem is, that our clients are mostly power users, who use numpad to enter numeric values. In numpad, the decimal separator is comma, so it's easily reached while editing grid cells and typing the numbers fast from numpad.
According to wikipedia (https://en.wikipedia.org/wiki/Decimal_separator):
Both a comma and a period (or full-stop) are generally accepted decimal separators for international use.
- decimal_separator_usage.jpg (196.38 KiB) Viewed 417 times
As for thousand separator, in finnish culture we don't use comma as a thousand separator, rather just empty space. Picture from the wiki:
- thousand_separator.png (80.71 KiB) Viewed 417 times
Summary: there is 2 things, that would need to be localized according to finnish culture standards. Thousand separator as space and comma used as decimal delimiter when inputting numbers. Decimal delimiter input is the most important thing.
Questions:
- Would it be possible to set the thousand separator and decimal delimiter as comma in inputs as a localizable thing in the locale-files? Or atleast the decimal delimiter. Could you develop such feature?
- Or should I implement a custom column to be used in Grid and do parsing of user input and rendering myself?
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Wed Oct 26, 2022 12:16 pm
by alex.l
We already supported number format localization.
If you check this example https://bryntum.com/examples/grid/localization/ , change language to, let's say, Deutsch, and try to write a big number/decimal into Age field, you will see it's working well.
All you need is to use proper localization code in locale
property of your localization file.
See examples in the demo I mentioned above.
Here is locale codes https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
We have a ticket about runtime localization change, but besides that all working well https://github.com/bryntum/support/issues/5437
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Wed Oct 26, 2022 2:25 pm
by TeemuL
Allright, thanks for this info!
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Thu Jun 08, 2023 3:55 pm
by joel moisio
Hi
Not sure if our problem has been understood correctly.
It seems that on the grid number column the editors format comes from browser language settings rather than grid locale settings.
Problem is easily reproduced on your test page:
https://www.bryntum.com/products/grid/examples/localization/
Before below sequence make sure that your browser language is set to English (United States) (I'm using chrome in this test).
- Select Svenska as the locale (i assume your example page sets the grid locale correctly via this choice as everything else gets translated).
- Edit Age (Ã…lder) cell on any of the rows
- Type 23.5 (with a dot)
- Complete the edit
- The rendered values decimals seem to be correctly rendered with a comma (even though we used dot when inputting the value)
- Edit the same column again on any row
- Type 23,5 (with a comma)
- The value is set to 235 even though the grid locale is set to Swedish, that uses comma as a decimal separator
Re: [INFO REQ] Grid number-column editing decimal-delimiter inconsistency
Posted: Fri Jun 09, 2023 10:39 am
by alex.l
Hi,
Thank you for steps to reproduce. I've opened a ticket for this problem here https://github.com/bryntum/support/issues/6948