Full OData (open data protocol) support for Datatables

Full OData (open data protocol) support for Datatables

CedricDumontCedricDumont Posts: 5Questions: 0Answers: 0
edited October 2013 in Feature requests
Hello,

Is there any support for datatables to send Odata queries directly to support filtering, paging... like a plugin.
exemple adding the url to the odata provider when building the datatables and the plugin handles the rest (paging, next, previous....)
If not I would like to create one, but as I am new to datatables, could someone point me to the correct path to handle this?

regards

Replies

  • allanallan Posts: 63,204Questions: 1Answers: 10,415 Site admin
    Not as far as I'm aware - sorry. You'd use fnServerData to override the Ajax call that DataTables makes.

    Let us know if you manage to make any headway with it!

    Allan
  • CedricDumontCedricDumont Posts: 5Questions: 0Answers: 0
    Thanks, I'll do that. I will try to implement that by the end of December. and will reply to this post with (I hope the solution) at that time.

    regards
  • allanallan Posts: 63,204Questions: 1Answers: 10,415 Site admin
    Give us a shout if anything in the server-side processing documentation isn't clear. It might be worth considering using DataTables 1.10 with its new parameters for server-side processing (there is a backwards compatible option as well, for anyone else reading this and who gets worried!). I'm writing the documentation for that, but drop me an e-mail if you want for bit more info on this at the moment ( allan @ this domain).

    Allan
  • CedricDumontCedricDumont Posts: 5Questions: 0Answers: 0
    Where can we find the 1.10 release ? or when will it be released?
    If you plan to commit it in these two weeks, I'll wait.


    regards
  • allanallan Posts: 63,204Questions: 1Answers: 10,415 Site admin
    Not released yet - its pre beta and available in git: https://github.com/DataTables/DataTables/tree/1_10_wip/media/js
  • CedricDumontCedricDumont Posts: 5Questions: 0Answers: 0
    Hello,

    I found this post regarding odata support: http://www.datatables.net/forums/discussion/comment/39744

    is this the right way to do? I am thinking of translating the aoData (which is an array of keypair to the actual $filter suported by odata.

    regards
  • allanallan Posts: 63,204Questions: 1Answers: 10,415 Site admin
    Yes, I think that's the correct way, in as much as there is a correct way :-)

    Allan
  • CedricDumontCedricDumont Posts: 5Questions: 0Answers: 0
    Hello,

    before coding this, are there any differences (in the aodata array) in the futur 1.10 version of datatables ? Will my code still be working when the 1.10 will be released?
  • allanallan Posts: 63,204Questions: 1Answers: 10,415 Site admin
    Try it and find out: https://github.com/DataTables/DataTables/tree/1_10_wip/media/js . It should, but you are correct, there are a lot of changes in the Ajax part of DataTables. i've tried to do it as backwards compatible as possible, certainly fnServerData will continue to function as before, even if it won't be documented method (the new `ajax` option will be).

    Allan
  • jocapcjocapc Posts: 45Questions: 0Answers: 0
    Hi,

    Could you try this: http://vpllan.github.io/jQuery.dataTables.oData/ Integration should be simple and works on my examples.

    Regards,
    Jovan
This discussion has been closed.