First understand the below example to see how to plug a grid to a store.
Then to sort alphabetically, based on locale use the code below
queryGrid.setStore(new dojo.data.ItemFileReadStore(response[responseResult]));
setCustomSort(queryGrid.store);
Define the sort function as below :
function setCustomSort(store){
if(!store.comparatorMap){
store.comparatorMap = {};
}
store.comparatorMap["name"] = function (a, b) {
return a.localeCompare(b);
}
For custom sort by date, refer the link below.
http://stackoverflow.com/questions/3967214/dojox-grid-datagrid-custom-sort-method