sort numeric fields

hi,
I hava a listgrid (with json datasource) with fields in different types such as String, select, …
when i sort grid with any fields this works right, but when i calling sort method in my code on select fields, works wrong! why??

Hi Nazil,

For this question, you’ll definitely need to show your code.

Hi,
This is partial of my code:

isc.DataSource.create({
    ID:"merchantDS",
    dataFormat:"json",
    dataURL:"view/getMerchants.action",
    fields:[
      {title: "name", name:"name", primaryKey: true},
      {title: "merchant", name:"merchant"},
      {title: "country", name:"country", editorType:"select", valueMap:{}}
    ]
  });

isc.ListGrid.create({
       ID: "_mainGrid",
       dataSource: "merchantDS",
       showAllRecords:false,
       autoDraw:false,
       autoFetchData: false,
       fields:[
           {name:"name", title:"name"},
           {name:"merchant", title:"merchant"},
           {name:"country", title:"country"}
       ],
       canReorderFields: true,
       sortBy : function(columnName){
         _mainGrid.sort(columnName); //on country column does'nt work correctly
       }

Hi Nazil, listGrid.sort() takes a number as the parameter. A quick way to go from field name to field index is grid.getFieldNum(fieldName).