myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
myDataSource.responseSchema = {
fields: ["rankid","rankName"]
};
//function sortby(a,b) {
// return a["rankid"] - b["rankid"];
//}
//myDataSource.liveData.sort(sortby);
...
var myColumnDefs = [
{key:"rankid", label:"id", sortable:true, resizeable:true},
{key:"rankName", label:"name", sortable:true, resizeable:true},
{key:"",label:"",resizeable:true, formatter:this.formatControl}
];
var myDataTable = new YAHOO.widget.DataTable("ranklist", myColumnDefs, myDataSource);
myDataTable.sortColumn(myDataTable.getColumn("rankid"));