Sep 11, 2015, 11:01 AM
TextField rounds number strings problem
Hi,
I'm creating a textfield with string values, the values are numbers with 17chars, but I'm facing a problem that the textfiled seems to convert them to int as a numberfield and rounds the last 3 numbers as below C# code and the string example:
First I create a PropertyGridParameter and then add the textfield to it with the dunamic values. It saves the right values to the DB but the viewing values get rounded.

789124893465912650
Get rounded to:
789124893465912700
At last I added EnforceMaxLength and MaxLength 40 but it didn't help. Any idea?
I'm creating a textfield with string values, the values are numbers with 17chars, but I'm facing a problem that the textfiled seems to convert them to int as a numberfield and rounds the last 3 numbers as below C# code and the string example:
First I create a PropertyGridParameter and then add the textfield to it with the dunamic values. It saves the right values to the DB but the viewing values get rounded.
var parameter = new Ext.Net.PropertyGridParameter()
{
DisplayName = GetLangText(prop.PropertyDesc),
Name = prop.PropertyId.ToString(),
Value = companyProp != null ? companyProp.PropertyValue : null
};
var textField = new Ext.Net.TextField();
textField.EnforceMaxLength = true;
textField.MaxLength = 40;
textField.ID = "TextField_" + prop.PropertyId;
parameter.EditorType = Ext.Net.PropertyGridEditorType.String;
parameter.Editor.Add(textField);
The string value is:789124893465912650
Get rounded to:
789124893465912700
At last I added EnforceMaxLength and MaxLength 40 but it didn't help. Any idea?