Hi Jorge,
Thanks for contacting Syncfusion support.
We can set the decimal places to numeric edit fields in TreeGrid. We need to define decimal places for the numeric field in the following format.
protected void Page_Load(object sender, EventArgs e) { //… var index1 = this.Treegrid.Columns.FindIndex(col => col.Field == "PercentDone"); this.Treegrid.Columns.ElementAt(index1).NumericEditOptions = new EditorProperties() { DecimalPlaces = 2 }; } |
Also we no need to set locale for separate numeric field as you have done in your code example. Once we set locale to the control it will take to all its fields.
We have also prepared a sample based on this and you can find the sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/NumericField1556664569
Regards,
Mahalakshmi K.
Hi Jorge,
We were not able to reproduce any issue in numeric field when locale applied to the TreeGrid. Please fine the below code example for details.
[ASPX] <script> ej.TreeGrid.Locale["es-ES"] = { toolboxTooltipTexts: { addTool: "añadir", editTool: "editar", updateTool: "actualizar", deleteTool: "borrar", cancelTool: "cancelar", expandAllTool: "expandir todo", collapseAllTool: "expandir todo", pdfExportTool: "exportación a PDF" }, } </script>
<ej:treegrid ID="Treegrid" runat="server" Locale="es-ES" //… > //… </ej:treegrid> |
[CS] protected void Page_Load(object sender, EventArgs e) { //… var index1 = this.Treegrid.Columns.FindIndex(col => col.Field == "PercentDone"); this.Treegrid.Columns.ElementAt(index1).NumericEditOptions = new EditorProperties() { DecimalPlaces = 2 }; } |
We have also prepared a sample based on this and you can find the sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/NumericFieldWithLocale231505062
If you still facing any issue, please get back to us by modifying this sample along with the replication procedure to reproduce it.
Regards,
Mahalakshmi K.
Hi Jorge,
Sorry for the inconvenience caused.
We were able to reproduce the issue while setting locale to the numeric field in TreeGrid. Hence we have also logged an issue report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Regards,
Mahalakshmi K.