Adding input fields in tables

Adding input fields in tables

pedalshoepedalshoe Posts: 9Questions: 0Answers: 0
edited January 2010 in General
Hi, Is there away to add an input field like a checkbox to a table using oTable.fnAddData() ?
Thank you

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi pedalshoe,

    Yes indeed - just pass in the HTML string that you want to use. DataTables added the new cell data using .innerHTML.

    Regards,
    Allan
  • pedalshoepedalshoe Posts: 9Questions: 0Answers: 0
    Thanks. I was experimenting, and i figured this out. I'm also specifying styles dynamically as well.
    Thank you for the response.
    -Christopher
  • asaasa Posts: 20Questions: 0Answers: 0
    Hi all

    i have issue related to this what if i want to add a row using oTable.fnAddData() ;
    the first cell is a radio button and the reset are string through json
    how can i do this ?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Not quite sure what you mean - you can just put any HTML you want into the table - text fields, radio buttons whatever. It shouldn't make any difference. This applies equally to fnAddData.

    Allan
This discussion has been closed.