This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, The default PropertyGrid editor for a double property doesn't support localization. The decimal separator seems to be always the dot '.' than you |
|
|
Hello I've tried to reproduce this at my end by using the Portugal culture, but the default numeric editor is correctly using a comma for the decimal separator. One thing you could do to improve the numeric editing experience is by placing this code within the PropertyGrid tags:
(Where sys is the System namespace). This tells the property grid to use a NumericTextBox editor for all double properties rather than the default TextBox with formatting. Alternatively, you could replace the "DoubleEditorKey" in the code above with "NumericUpDownEditorKey" which adds up/down functionality to the editor. If for some reason it is still using the dot as the decimal separator, please let me know what culture you are using. Jason Fauchelle |
|
|
Hi Jason, I tried that but I get the following error : error MC3011: Cannot find the static member 'DoubleEditorKey' on the type 'PropertyGrid' I tried to find the 'DoubleEditorKey' using the .NET Reflector, but it doesn't seem to be defined. BTW : I'm using the Italian culture, I wonder how you can't reproduce the problem. I'm running the your samples solution where I changed the Person.Age property from int to Double and I can only use the dot to edit double |
|
|
Hello I forgot to mention that the DoubleEditorKey is a feature that was added in a nightly build, rather than the latest major version. To resolve this, you can install the latest nightly build. You can download this from your account page: http://www.mindscapehq.com/store/myaccount There are 2 Italian cultures: Italiy which uses comma for the decimal separator, and Switerland which uses the dot. Is it that you are using the Switzerland version of the Italian culture? Are you manually setting the culture of the application? or is your test machine using the Italian culture? Jason Fauchelle |
|
|
ok, the latest build works, thanks |
|