Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3019

Decimal Separator Error in system matrix

$
0
0

hi,

I'll try to add values to invoice system matrix cell (the column type is st_Sum) using ui api;

 

the problem is that if for example i'll try to insert the double value "11.2", the value that is written in the cell is "112,00" instead of "11,2".
How can i solve this problem?

i tried to replace the "." with the NumberDecimalSeparator used by the system, but the problem returns again.

 

Here is the code that i use:

 

double d1 = 11.2;
oMatrix.SetCellWithoutValidation(pVal.Row, "U_Col_1", double.Parse(d1.ToString().Replace(".", System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.ToString())).ToString());

 

I also tried to use this code but nothing change:

 

EditText oEdit= (SAPbouiCOM.EditText) oMatrix.Columns.Item("U_Col_1").Cells.Item(pVal.Row).Specific;
oEdit.Value = d1.ToString().Replace(".", System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.ToString());

 

How can i solve this problem?
thanks in advance!

 

Michele


Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>