Dynamically Adding a CheckBox in a Row
Dynamically Adding a CheckBox in a Row
wurb_travelsky
Posts: 3Questions: 0Answers: 0
Hi, I am a newbie in JQuery, and also in DataTables.
My question is if I want to 'dynamically' add rows to an empty table, how could I add form elements(such as checkbox, radio, and so on)?
Fairly appreciate if anyone could help me.
My question is if I want to 'dynamically' add rows to an empty table, how could I add form elements(such as checkbox, radio, and so on)?
Fairly appreciate if anyone could help me.
This discussion has been closed.
Replies
Cf http://datatables.net/examples/api/add_row.html for how to add a row via JavaScript.
You can specify the html for a checkbox there.
If you want to add the checkbox while rendering the table, you can do this via fnRender(), there is an example here: http://datatables.net/examples/advanced_init/column_render.html
Ask more if you encounter any problems while trying :-)
hth, pktm
Thanks, pktm.