How to display column values

How to display column values

gouldiegouldie Posts: 4Questions: 1Answers: 0

Hi all,

I feel a bit stupid asking these questions since I have covered literally hunderds of posts looking for help and it seems everybody knows what they are doing except me.

I have implemented a table using:

$('#example20').DataTable();

I added a checkbox as the first column, so what I wanted to do now was upon pressing a button, I would be able to get all the values of column b with selected checkboxes.

Let alone check boxes, I can't even figure out how to alert() all the values of column b. I've read the API but can't find anything for just reading the values of a selected column.

taking this as an example:
http://live.datatables.net/viyiyaco/1/edit

How do you read all the name column values? Is there a function in datatables that does it for you, or must you use jquery to find it?

Also can you do a general post or do you have to use ajax to submit it to the database?

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    There's an example of using DataTables with form inputs:

    http://datatables.net/examples/api/form.html

  • gouldiegouldie Posts: 4Questions: 1Answers: 0

    Hi I did try that, but the serilaize option only takes inputs, selects for forms which might not be exactly what I'm looking for.

    As you can see from the link I provided you, the table has one checkbox field and the rest are all data.

    My question was how do you alert values from columns that contain NO form inputs

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    My apologies - for some reason I had remembered that link as being an example of checkboxes. I need to upgrade my memory....

  • gouldiegouldie Posts: 4Questions: 1Answers: 0

    No problem :), it was abit of both, the first thing I was looking to understand first is how to obtain the values in the non form columns

  • gouldiegouldie Posts: 4Questions: 1Answers: 0

    anyone able to help?

This discussion has been closed.