dojo datagrid custom sorting server side -


I am using dojo.data.ItemFileWriteStore shows a dojo datagrid (which works fine) and shows the grid properly is. I was using client side sorting and it was working fine too. But now I need to change the sorting and side of that server, for that I am trying to use on the headerklick event, which I am able to use to run the javascript function ..

  GridInfo = {store: myJsonStore, structure: myStructure onHeaderCellClick: getSortedTable};  

Now here is the getSortedTable function that I want to use to make another call on the server - pass cell name, table name and sort order (acc or camp).

function getSortedTable (e) {var selename = e.cell.name; Var tableName =? Var sortOrder =? // getSortedTablefromServer (cellName, sortOrder, tablename)}

But I can name only the thihng cell name and able to exit the 'e' parameter.

  1. How can I retrieve or track the weather, whether it will be required by the user to be mounted or it is descending order.
  2. In addition - How will I show the small arrow at the top of the column to show the user that the data is descending or climbing?

Any help is highly appreciated!

Thank you,

You would better modify your data to server instead of grid -Side to handle side sorting (for example, instead of sorting client side, add sort criteria as a query parameter for triggering XHR calls by fetch () ). The grid should behave properly with customer-side sorting because it will only reflect the sort order of the data store.

dojo.data.api.Read related to fetch () :

  if a type of parameter is specified, then To dump items before returning to the item, it is a datastore sign that the array is an array of JavaScript objects, which should be consistent with the following format for the benefit of the items: {attribute: attribute || Attribute-name-string, descending: true | wrong; // Optional default is false} Note that while comparing properties, if there is no value for an attribute (undefined) in an item, then this default ascending sequential argument should be located below that list. In case of descending order, it should appear at the top of such list list.  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -