MrNase
16 Aug 2007, 7:24 AM
Hello! :)
I'm having fun with the Editor Grid Example from the Ext Documentation Center.
I copied the following code and changed it to my needs:
var Plant = Ext.data.Record.create([
{name: 'A', mapping: 'a'},
{name: 'B', mapping: 'b', type: 'int'},
{name: 'C', mapping: 'c', type: 'string'},
]);
Now, column 'B' has contents that are like '001' or '014' - always with one or two leading '0'.
Setting the 'type' to be 'int' isn't a good idea because the leading 0's are removed so I would need to set the 'type' to be 'number' but the following code doesn't work. :(
var Plant = Ext.data.Record.create([
{name: 'A', mapping: 'a'},
{name: 'B', mapping: 'b', type: 'number'},
{name: 'C', mapping: 'c', type: 'string'},
]);
Am I safe when I go for 'type: 'auto'' even though it's really a number I want to display? :)
Thanks for your time and patience. Ext JS rocks! :)
I'm having fun with the Editor Grid Example from the Ext Documentation Center.
I copied the following code and changed it to my needs:
var Plant = Ext.data.Record.create([
{name: 'A', mapping: 'a'},
{name: 'B', mapping: 'b', type: 'int'},
{name: 'C', mapping: 'c', type: 'string'},
]);
Now, column 'B' has contents that are like '001' or '014' - always with one or two leading '0'.
Setting the 'type' to be 'int' isn't a good idea because the leading 0's are removed so I would need to set the 'type' to be 'number' but the following code doesn't work. :(
var Plant = Ext.data.Record.create([
{name: 'A', mapping: 'a'},
{name: 'B', mapping: 'b', type: 'number'},
{name: 'C', mapping: 'c', type: 'string'},
]);
Am I safe when I go for 'type: 'auto'' even though it's really a number I want to display? :)
Thanks for your time and patience. Ext JS rocks! :)