title: dojo datagrid custom sorting server side
body: <p>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 </p>
  
  <pre><code> gridInfo = {
              store: myJsonStore,
              structure: myStructure
              onHeaderCellClick:getSortedTable
           };
  </code></pre>
  
  <p>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).</p>
  
  <pre><code> function getSortedTable(e)
      {
    var cellName = e.cell.name;
              var tableName = ?
              var sortOrder = ?
            // getSortedTablefromServer(cellName, sortOrder, tablename)
      }
  </code></pre>
  
  <p>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. </p>
  
  <ol>
  <li>How can I get or keep a track of weather it will be ascending order required by the user or is it descending order. </li>
  <li>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?</li>
  </ol>
  
  <p>Any help is highly appreciated!!</p>
  
  <p>Thanks,</p>