get the selected row ith column

get the selected row ith column

dharmjitdharmjit Posts: 6Questions: 2Answers: 0

Hi everyone,

I am trying to get the value of ith column of selected row of a table. Selected row I can get using dt.rows('.selected').data().
From this how can i get the column ith value.

Thanks in advance.

Replies

  • dharmjitdharmjit Posts: 6Questions: 2Answers: 0

    Hi Allan. Can you please help me on this? Thanks

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin
    var rowIdx = table.row( { selected: true } ).index();
    var cellData = table.cell( rowIdx, 8 ).data();
    

    change 8 to suit your needs.

    Allan

This discussion has been closed.