0

私は YUI データテーブルを使用しています。列をソートしたい。これは文字列であるため、名前列は正常に機能しています。ただし、列「ftrIdentifier」も、コンテンツを数値ではなく文字列としてソートします。誰かがこれについて私を助けることができますか?

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);
}
4

1 に答える 1