I am using YUI datatabale. I want to sort columns. Name column is working fine as this is a string. But Column "ftrIdentifier" also sort the content as string not as number. Can someone help me on this.
function tableFeaturesWithCheckBoxes1() {
var myColumnDefs = [{
key: "name",
label: commonMessages.featureTblHeading,
className: "tbldata",
minWidth: 80,
width: 90,
sortable: true
}, {
key: "ftrIdentifier",
sortColName: "ftrIdentifier",
label: "Id",
width: 50,
sortable: true
}];
myDataSource = new YAHOO.util.DataSource(messages);
myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
myDataSource.responseSchema = {
resultsList: "features",
fields: ["name", "ftrIdentifier"]
};
var conf = {
height: "13.8em",
width: "45.2em"
};
conf = localizeDataTableMsgs(conf);
dt = new YAHOO.widget.ScrollingDataTable("box1", myColumnDefs,
myDataSource, conf);
}