Server side processing, replace keywords with custom ones

Server side processing, replace keywords with custom ones

keremburakkeremburak Posts: 3Questions: 1Answers: 0

Hi all,

I tried to used this nice plugin. I need to user server side processing with ajax. But, when I check documentation,datatables has own properties like draw,start, length and etc.

Can we replace these keywords with our own ones? For example, we have no "draw", key word, or length or start.

The thing that I want to do is that replace these keywords with our own keywords in the ajax url with key-value pairs or any other usable ways.

Could you give us a hand?

Thanks in advance.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    That's the protocol that the serverSide expects on the client-side - the protocol is discussed here.

    It's open-source, so you can change it, you just need to dive into the code.

    Colin

  • keremburakkeremburak Posts: 3Questions: 1Answers: 0

    Thanks for answer. I read that documentation. But, how can we change / swap parameter with our own ones. Because, our API has different parameter names. For example, we have "index, size, orderby" and etc parameter names for requesting API.

    For example, a sample end point list this:

    https://{api_base_url}/v1/member?index=0&size=20

    And our response has these parameters and total record count, page count and etc.

    Let's discuss above endpoint

    I need to pass values to "index" and "size" parameters. And when we have response we swap/change the Datatables draw, length, and other parameters in order to display our data.

    How or where can we do this parameter swap operation?

    In a Datatables function or any other parameters in Datatables options?

    Is that clearer?

    Kerem

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Yep, it was clear before :) But as I said, the protocol is what it is, but as it's open source, feel free to modify it.

    Colin

  • keremburakkeremburak Posts: 3Questions: 1Answers: 0

    :)

    Thanks

This discussion has been closed.