Need to Load DataTable on an Event
Need to Load DataTable on an Event
Test Case: http://live.datatables.net/qepomefo/6/edit
I have a situation where I don't want the datatable to load its data initially but after a certain event occurs. To simplify my example, I created a button in the test case with an onClick event that will be the event. My question is how do I assign a value such as a JSON array to the datatable's data source when the button is clicked? My problem is the datatable is not loading the data from the JSON array.
This question has an accepted answers - jump to answer
Answers
You don't need to use
data
. Userows.add()
to add the data. Like this:http://live.datatables.net/qepomefo/7/edit
Kevin
Thanks Kevin