how to send the data and refresh the data in the table with post

how to send the data and refresh the data in the table with post

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 20,317Questions: 26Answers: 4,772
    edited November 2020

    I don't understand your question. Seems like this is working:

          data: function ( d ) {
            d.includeInactive = that.includeInactive;
          }
    

    it sends the includeInactive parameter with the value of false.

    Please provide more information of what you are trying to do.

    Kevin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0
    edited November 2020

    I got that @kthorngren
    Thanks.

    I have more one doubt, how to show a loader/spinner on the datatable while fetching records

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0
    edited November 2020

    I added datatableDefault["processing"] = true;
    but it is not showing processing on table.
    Is there anything that i have to add to make it working

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    Just that option, as the links that Kevin pointed to say. If it's not working, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0
    edited November 2020

    http://live.datatables.net/wilavabi/6/edit
    Please find the test case here.
    and i want to show the spinner instead of "processing"

  • kthorngrenkthorngren Posts: 20,317Questions: 26Answers: 4,772

    I might be missing it but I don't see the code you tried. Please post a link to the test case showing the issue you are having with the spinner so we can help debug.

    Kevin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0
  • kthorngrenkthorngren Posts: 20,317Questions: 26Answers: 4,772

    Sorry, I'm not seeing the code you are trying to use for the spinner. The threads I provided have multiple options. Which are you trying and does this example have that code?

    Kevin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0
    edited November 2020

    May be i am not explaining it to u properly.I am not able to see the "Processing....". This is server side table, on navigating from one page to another page. Not able to see "Processing..." even though i added "processing" : true.

    http://live.datatables.net/wilavabi/8/edit

    If u can look at the test case u can help me in this regard

  • kthorngrenkthorngren Posts: 20,317Questions: 26Answers: 4,772
    Answer ✓

    I see. Thought you were trying to use one of the custom solutions. Your dom option is incorrect:

    "dom": "<t><\"text-center\"<\"pagination d-flex justify-content-center \"p>>",
    

    You need to add r for the processing element. Here is the updated example:
    http://live.datatables.net/wilavabi/9/edit

    Kevin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0

    @kthorngren thanks so much for saving my time.

    If i want to hide the entire table and show only the processing . what shuld i do?

  • colincolin Posts: 15,146Questions: 1Answers: 2,586
    Answer ✓

    Probably the easiest way would be to use the processing, and use jQuery's hide() and show(),

    Colin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0

    Thank you @colin , you guys are awesome :smile:

This discussion has been closed.