When adding a row dynamically using jQuery DataTables plugin, what do I do if one of the cells has to be, say, a checkbox? Just put the HTML in quotes?
-
Are you talking about datatables.net?chobo2– chobo22010-08-09 21:26:11 +00:00Commented Aug 9, 2010 at 21:26
-
@chobo, no, not .net. The jquery plugin called DataTables. @Sar I haven't tried anything yet. Feel free to ignore me while I try that.bmargulies– bmargulies2010-08-09 21:27:50 +00:00Commented Aug 9, 2010 at 21:27
-
Can you put a link. There seems to be many things called DataTables.chobo2– chobo22010-08-09 21:29:07 +00:00Commented Aug 9, 2010 at 21:29
-
@cho -- I see, I competely misread your comment. Yes, it's the thing from datatables.net. However, I've hit a much dumber problem in before I can even try this issue here.bmargulies– bmargulies2010-08-10 00:08:30 +00:00Commented Aug 10, 2010 at 0:08
-
@cho It was a stupid error not worth discussing here. All is well.bmargulies– bmargulies2010-08-10 13:00:30 +00:00Commented Aug 10, 2010 at 13:00
Add a comment
|
1 Answer
Ok now I know it is the plugin that I am using.
I did mine on the server but you should just write the html in the column.
I will try to make an example in a few minutes.
This is how my checkbox comes from the server
"CheckBox":"\u003cinput type=\"checkbox\"\u003e\u003c/input\u003e"
However this should work
dataTable.fnAddData(['<input type="checkbox" name="vehicle" value="Bike" />','SomeOtherDataForAnotherColumn']);
1 Comment
Hany Alsamman
Deprecated Custom display function that will be called for the display of each cell in this column. check here