Hello I am using dojo.data.ItemFileWriteStore to draw a dojo datagrid (which works fine) and the grid shows properly. I was using client side sorting and that was also working fine. but now I need to change the sorting and do that server side. For this I am trying to use onHeaderCellClick event, using which I am able to run a javascript function.. something like
gridInfo = {
store: myJsonStore,
structure: myStructure
onHeaderCellClick:getSortedTable
};
Now here is the getSortedTable function which I want to use to make another call to the server - passing the cell name, Table Name and the sort Order (asc or desc).
function getSortedTable(e)
{
var cellName = e.cell.name;
var tableName = ?
var sortOrder = ?
// getSortedTablefromServer(cellName, sortOrder, tablename)
}
but the only thihng I am able to get out of from the 'e' parameter is the cell Name and may be the table Name.
- How can I get or keep a track of weather it will be ascending order required by the user or is it descending order.
- Also - how will I show the little arrow on the header of the column to show the user that the data is in descending or ascending?
Any help is highly appreciated!!
Thanks,