Change decimal separator to point instead of comma

Hello

Currently I am using the SfPropertyGrid to set some floating point values. All I want to do is change the decimal separator to be a point instead of a comma. I believe it will have something to do with setting the culture of the element or something with localization but I have no idea how.  


3 Replies

SN Sudharsan Narayanan Syncfusion Team December 6, 2021 12:54 PM UTC

Hi Gerrit,

Thanks for contacting Syncfusion Support,

We have checked the reported query that “
Change decimal separator to be a point instead of a comma” from our end and prepared a sample by using the
CurrentCulture to achieve the requirement. So, it will work for the formatting Culture, Please find the sample, and code snippet from the below for more details,

Code Snippet:

 
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE"); 

Sample: https://www.syncfusion.com/downloads/support/forum/170945/ze/PropertyGridCulture-1757711733


Please check the above code and let me know your concerns, We are happy to assist you.

Regards,
 
Sudharsan 



GE Gerrit December 9, 2021 11:11 AM UTC

Good day 

I have run the sample app but the decimal separator is still a comma. Does it perhaps have to do with the region or culture of the machine it is running on ?

 


Attachment: Capture_b654c2b1.zip


SN Sudharsan Narayanan Syncfusion Team December 12, 2021 02:45 PM UTC

Hi Gerrit,

Thanks for the update,

We have checked the reported query that “Change decimal separator to be a point instead of a comma” from our end and prepared a sample to achieve the requirement. So, please find the ways to achieve from below,

1. By setting the CurrentCulture in the App.xaml.cs to change the separator of the Editor.

2. By using the Custom Editor and we can assign the editor by using the decimal separator for custom editor.

And please find the sample and video below, we demonstrate your requirement,

Sample: https://www.syncfusion.com/downloads/support/forum/170945/ze/PropertyGridCulture1861102712

Video: https://www.syncfusion.com/downloads/support/forum/170945/ze/PropertyGridVideo459188413

Link: https://help.syncfusion.com/wpf/propertygrid/customeditor-support

Regards,
Sudharsan


Loader.
Up arrow icon