hi ,
Sorting is being done in lexicographical order and not according to datatype. Please help.
below is my code :

Ext.grid.DynamicColumnModel = function(store){
var cols = [];
var recordType = ds.reader.recordType;
var fields = recordType.prototype.fields;


cols[0] = sm2;
for (var i = 1; i < 2; i++)
{
var fieldName = fields.keys[i];
var field = recordType.getField(fieldName);
cols[i] = {header: columnName(field.name), dataIndex: field.name,sortable:true,width:200,renderer: rhpRenderer,hideable:false};
}
cols[2] = {width : 80, renderer: imageRenderer, dataIndex : ''};
for (var i = 2; i < fields.keys.length; i++)
{
var fieldName = fields.keys[i];
var field = recordType.getField(fieldName);
if(field.name == 'sect_name' || field.name == 'sc_group'){
cols[i+1] = {header: columnName(field.name), dataIndex: field.name,sortable:true,width:100,align: 'left'};
}else{
cols[i+1] = {header: columnName(field.name), dataIndex: field.name,sortable:true,width:100,renderer: roundRenderer,align: 'right'};
}
}
// for sorting
store.fields = store.reader.recordType.prototype.fields;
Ext.grid.DynamicColumnModel.superclass.constructor.call(this, cols);
};