Get Filtered Data to controller

Get Filtered Data to controller

novatroop77novatroop77 Posts: 14Questions: 4Answers: 0
edited September 2021 in DataTables 1.9

My Remit has changed and I need to be able to get the filtered data ie the data only searched and return to user to a MVC controller in asp.net is their a function like rows.data that would retain the pre existing data on the filtered level.

Answers

  • novatroop77novatroop77 Posts: 14Questions: 4Answers: 0

    table.rows dont appear to be working for me so they dont was it brought in to a more recent version

  • novatroop77novatroop77 Posts: 14Questions: 4Answers: 0

    I see the data in the array [0] but every time i try to access it says property not supported

  • novatroop77novatroop77 Posts: 14Questions: 4Answers: 0

    Oh an it still needs to take into account the pagiing ie if the user filters 12 records and the 2 records on page 2 it should bring back all pages of data . To the controller

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    To get the filtered rows, you can use selector-modifier for rows(), something like this:

    data = api.rows({search:'applied'}).data().toArray()
    

    which you can then send back to your controller,

    Colin

  • novatroop77novatroop77 Posts: 14Questions: 4Answers: 0

    But thats not in 1.9.4 sure ? any time i attempt it says not support

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    I'm not sure tbh! It would be worth updating to 1.11 (the current version) if you can, 1.9.4 is 9 years old so well outside of anything we're able to support!

    Colin

Sign In or Register to comment.