Sencha Ext JS siempre devuelve el valor actualizado como cadena

I'm running into a problem when i'm using Sencha Ext library

I have a grid with crud options. I bind a object to the grid and when i edit a value which is decimal, double or float value and push update or it always returns a string object.

Por ejemplo:

In the grid it binds a decimal value 1.567, i edit it in the grid and change it to 1.467 and push update.

When i look into the response object POST i see that the value is now "1.467", hence it is now a value with the type string.

And therefor when i use this method:

public JsonResult Update(List<Investments> data)
   //here will be update sql query

the object that holds the updated data is now 0.0, not 1.467 because i cannot typecast a string to double. The column has a property the defines particular column as type double.

¿Alguien puede ayudarme?

preguntado el 01 de febrero de 12 a las 14:02

1 Respuestas

Double is not a valid field type. Instead, use float in your store's field config.!/api/

Respondido 01 Feb 12, 20:02

Ok thank you, but that does n ´t answer the question why the updated field is always returned to the server as string. Because of that, the server object takes the data sent from client and typecast it back to double and ends up with "5.91" > 0.0 (decimal) - aghaux

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.