-
14 Sep 2007 2:47 AM #1
Grid Sorting does not properly orders the values.
Grid Sorting does not properly orders the values.
Hello,
I am facing a small issue while sorting the gird.
I have a column which contains some strings, few of them are just empty strings ie. "".
Example data is:
ABCD11111
CN5446991
NYKU 646300-6
NYKU 646300-4
OCLU 123123-2*OCLU 123123-2
9
A8
MANI123654
The problem is that whenever i click on header of this column the grid gets sorted but it does not sorts as expected.
It should sort in the order of A-Z but it gives me a random sort, a few "A" strings are at top, then a couple of "B","C","D" and so on strings.
and again randomly i get "A", "B"... strings at the bottom.
Can anyone suggest what might be causing this.
Thanks!
Sandeep.
-
14 Sep 2007 2:51 AM #2
Can you post your code please?
-
14 Sep 2007 5:40 AM #3
When you define the record, make sure to set that column to the correct 'type' (in this case, 'string'). Example:
Code:var record = Ext.data.Record.create([ {name: 'id', mapping: 'id', type: 'int'}, {name: 'foo', mapping: 'foo', type: 'string'} ]);
-
16 Sep 2007 10:27 PM #4


Reply With Quote