Allocation of row ids.

Allocation of row ids.

tangerinetangerine Posts: 3,348Questions: 36Answers: 394

I'm not crystal clear on how row ids are allocated by DT.
Is it the case that, if my table initialisation includes an explicit definition (e.g. rowId: "song_id"), then whenever that table is in play the numeric part of rowId is guaranteed to be the song_id?
That's the way it looks, but I want to be sure. I'm asking because I need more aspects of my app to become generic, and using row ids is a significant step.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Answer ✓

    then whenever that table is in play the numeric part of rowId is guaranteed to be the song_id?

    Spot on.

    If there is a valid value in whatever property the rowId property points to, then DataTables will assign that as the row DOM id. The default is to look in a property called DT_RowId. If there is no value in the property, then no row id is assigned automatically.

    Allan

  • tangerinetangerine Posts: 3,348Questions: 36Answers: 394

    Excellent! Many thanks Allan.

This discussion has been closed.