Datatable - Get row index based on row id

Datatable - Get row index based on row id

nodiced922nodiced922 Posts: 1Questions: 0Answers: 0
edited October 2013 in DataTables 1.9
I would like to delete a row in a table based on the row id but I am having trouble getting the index based on row id.
How can I get the row index based solely on the id value of the row?

var row_id = 432;
var row_index = "someCode that gets me the index based on" (id)
oTable.fnDeleteRow(varid_num );

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Is this want you want?

    [code]
    table.fnDeleteRow( $('#myId')[0] );
    [/code]

    Allan
This discussion has been closed.