Get All Records

Get All Records

cecesyamsulcecesyamsul Posts: 2Questions: 1Answers: 0
edited April 2022 in General

Hi All..
I want to get value of radio button on each row even from another page,
but I just only get radio button value from current page..
I Need some advice..Thanks

Answers

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

    Are you using serverSide, then that is expected as only the data in the current page is available to the browser.

    If not, 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

  • cecesyamsulcecesyamsul Posts: 2Questions: 1Answers: 0

    No..I dont use serverside..

    here I want to save data from radio button, radio button in each row..
    here i use 1 page a row

  • kthorngrenkthorngren Posts: 20,150Questions: 26Answers: 4,736
    edited April 2022

    You can use cells().nodes() or column().nodes() to get the HTML nodes for all rows. You can then get the radio button state. If you need help with this please build a simple test case with an example of what you have so we can provide more specific suggestions.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • allanallan Posts: 61,453Questions: 1Answers: 10,055 Site admin

    DataTables removes rows from the DOM that aren't needed for the current page - hence why simply selecting the elements from the document only give the current page of information.

    Your best bet is probably the $() extension function which can be used to query all rows as if it were a standard jQuery selector.

    See this example.

    Allan

Sign In or Register to comment.