Highest id

Highest id

SoshiroSoshiro Posts: 2Questions: 1Answers: 0

Im looking for the highest id in the datatable regardless of whether its on this page or the next.

Im a student and new to all of this, so i apologise for my vagueness.

Answers

  • SoshiroSoshiro Posts: 2Questions: 1Answers: 0

    I should elaborate a bit. I want to look for the highest id in the table so i can var++ and then create a new page.

    we use datatable as a index for exercise we've made and its all javascript.

  • allanallan Posts: 63,852Questions: 1Answers: 10,519 Site admin

    Sounds like you want to use rows().data() to get the data for the rows and then simply loop over it. You could use pluck() if you want to get a specific data point out of the data and the perform your loop on it, or do something more clever such as sorting to get the maximum value.

    Allan

This discussion has been closed.