its posible to add attr to a column and read it? to send data to db with ajax with toggles

its posible to add attr to a column and read it? to send data to db with ajax with toggles

Diego MartinoDiego Martino Posts: 5Questions: 2Answers: 1

I have many columns, the order and quantity its not always the same, and some hidden colums and left joins too. But some of this columns have toggles that send data to specific columns to db thru ajax.
The toggles can be at any position and can be more than one.
Im triyng to add attr to columns to read it and know the cell db and table were send the data.

This question has accepted answers - jump to:

Answers

  • Diego MartinoDiego Martino Posts: 5Questions: 2Answers: 1
    Answer ✓

    I solved this with:

    table.cell($(this).closest('td')).index().column;

    // searching the columns of the cell

    var celdas_db = $(table.column( idx ).header()).attr('ref');

    // then the attr of header of column
    // and work great.!!

    :)

  • allanallan Posts: 61,439Questions: 1Answers: 10,052 Site admin
    Answer ✓

    Thanks for posting back. Good to hear you got it working.

    Allan

  • Diego MartinoDiego Martino Posts: 5Questions: 2Answers: 1

    Allan I need to congratulate you for this excellent product and the brilliant support. Every day I found on Datatables functionalities that I think its not posible dt do, but are there and works... congratulations.

  • allanallan Posts: 61,439Questions: 1Answers: 10,052 Site admin

    Thank you - you've made my day :).

    Allan

This discussion has been closed.