1

I have painted a datatable with checkbox's against each row. Now when i select certain checkboxes and click submit , I want to get the value of all the columns in the entire row.

I tried using $('tr input',oTable.fnGetNodes()).serialize(); , but this returned only the value of the checkbox. How can i get the value of the entire checked row.

2
  • this SO link may help you stackoverflow.com/questions/5678624/… Commented Oct 24, 2011 at 10:09
  • What do you mean with 'value of the entire checked row.'?Can you provide an example and the expected result? Commented Oct 24, 2011 at 10:52

1 Answer 1

2

Resolved the issue.

Looped over each of the tr rows in the Datatables, and got the an array containing value of each cell using

$('#DataTable tr').each(function() {    
          var rowData = this.cells

rowData is an array which contains the values of each of the cells.Since the checkbox was the first column , got the value of the first column from the rowData array like this

rowData[0].firstChild.value
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.