I want to know whether a particular row is already selected or not.?

I want to know whether a particular row is already selected or not.?

priyankabhattadpriyankabhattad Posts: 4Questions: 3Answers: 0

I tried using the any() method, but that will return if any of the rows in the table are selected. How do I find if a particular row is selected in the select event.

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    In my testing indexes seems to always point to the last node selected even when multiple rows are selected.

    http://jsbin.com/yafuvah/36/edit is where I played with this

    var table = $("#example").DataTable();
    table.on('select', function(e, dt, type, indexes ){
        var rowData = table.rows(indexes).data()[0];
        var htmlNode = table.rows(indexes).nodes()[0];
    });
    
This discussion has been closed.