Type detection doesnt work on server-side data

Type detection doesnt work on server-side data

foimystfoimyst Posts: 10Questions: 0Answers: 0
edited September 2010 in General
Sorry if its a repost but I tried and tried everything to answer this problem but in my vain. The thing is if we do this on a already filled up table, sorting is ok. But if its from a server-side, table is ok but; but when i clicked the headers to sort, no sorting is done. I tried it on datatable 1.6.2 and 1.7.1 and i can't do it on both. I'm using mozilla 3.10.

I haven't upload everything but you can see it in http://julztest.zxq.net... Thanks...

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    With server-side processing, the sorting (and filtering and everything else) is done by the server-side process - not by the client-side. The sType will have no effect on how the server handles the information - it needs to be explicitly programmed to handle the columns as you wish them to be done. With server-side processing, DataTables is effectively a display and event management layer - it does not do any data processing at all.

    Regards,
    Allan
  • foimystfoimyst Posts: 10Questions: 0Answers: 0
    Ah ok... so i need to explcitly programmed the sorting... ok i taught datatable should handle it, cause its a json file and datatables has type-detection and sorting ready... maybe on the next iteration.... Thanks ;)
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    DataTables can't do any sorting on the client-side when server-side processing is enabled, since it doesn't have the full result set. It could do sorting on the result set that is returned to it - but that might only be 10 rows out of millions. So there is no way for it to be able to do a sort on the client-side. This is why it needs to be done on the server-side, where the full data set is available.

    Regards,
    Allan
This discussion has been closed.