|
Rank: Newbie Groups: Member
Joined: 9/16/2010 Posts: 9
|
Hi
I have a column in a grid, that is bound to a numeric field. I have "{0:C}" as dataformat.
In display-mode: "$" i used as currency symbol and ", (comma)" is used af decimal separator. In edit-mode the decimal seperator changes to ". (dot)".
1) How do I get "kr" as currency symbol,
2) How do I get comma as decimal seperator edit-mode ?
best regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, I don't believe there is any easy way to get both. The "C" format is based on your system culture settings. So it should take whatever currency sign your system is configured to. To change either the currency sign or decimal separator you will need to change your system locale settings. There is no direct way for you to replace "." with "," on the client side either. The Grid does support CustomColumn, so it is possible for you to implement both formatting (so that you can put "kr" and "," in correctly) and editing (so that you can have "," instead of ".") with JavaScript. CustomColumn is much more complicated than built-in columns because basically the Grid only provides you a cell and you will be responsible to everything inside that cell. If you have not used CustomColumn before, you will want to go over this first: http://doc.essentialobjects.com/library/1/grid/custom_column.aspxHope this helps. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 9/16/2010 Posts: 9
|
Hi
I have my system settings set to Danish, but the EO:Grid still shows $ as currency symbol I hane an asp:gridview on the same page, and it shows "kr." as currency symbol
best regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have confirmed this to be a bug. We will fix it and provide you an update build shortly.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We have posted a new build that should fix this issue. Please see your private message for download location. Note you may need to set your page's Culture property for it to take effect. For example:
Code: HTML/ASPX
<%@ Page ..... Culture="da-DK" ....%>
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/16/2010 Posts: 9
|
Hi
Thanks for your quick response.
The currency symbol problem is now solved,
but the decimal seperator problem is not:
Lets say I have the value "45,56" (with comma) i a cell (It is displayed that way) When the cell changes to edit mode, the value is displayed as "45.56" (with a dot) If I type "45,78" (with comma) in the cell, it is displayed like that, but when I read the value on the server side, it is now "4578"
Conclusion: It ignores comma as decimal seperator. You must use dot.
This is acceptable i my solution :(
Best regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
No. The new build will not fix the "." problem for you, it only fix the currency sign. You must use dot in your text box if you use a TextBoxColumn. As already explained earlier, You can use a CustomColumn to implement the parsing by yourself if you wish to support “,” in the textbox. Please let us know if you have any questions using CustomColumn.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Quote: 1) How do I set focus to the textbox so I can edit the value without using the mouse ?
You will need to add code in your cellselected handler to set focus to your textbox. Currently you are only putting the cell into edit mode. However a CustomColumn can contain multiple editing UI elements and the Grid does not know which one you may or may not want the focus. So would just add code to do it when you see fit. Quote: 2) The textbox is larger than the cell. Is is possible to get the size of the textbox to match the cell ?
You can change the CSS style on your textbox to accomplish that (for example, a smaller font). The key to custom item is the Grid gives you an empty cell and that's pretty much it. Everything inside the cell will be handled by your code one way or another. Hope this helps. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 9/16/2010 Posts: 9
|
Hi
It is working now.
I must admit, I am quite dissapointed, that I have to create all number columns which are not integers, as custom columns, just because EO:Grid only supports dot as decimal seperator.
That is NOT good service for your european customers :(
Best regards
|
|