Rebinding hell...
Rebinding hell...
I have a pretty stylish datatable and I need to rebind or reinitialize it after an ajax event gets updated data. My Ajax request needs to return HTML because I have class and style info on the data cells, so I am currently passing back the generated html markup for the new data rows. I now need to bind that markup to the datatable, but nothing works.
I have tried fnClear, and redraw. I tried destroying the table object and creating a new one. How can I get this to work?
My Ajax request
$.ajax({
url: '/Planner/Planner/GetTasksByDateRange',
data: { "dateFilter": dateFilter },
dataType: 'html',
success: function(RenderedTable) {
$('#plannerTable').html(RenderedTable);
}
});
I have tried fnClear, and redraw. I tried destroying the table object and creating a new one. How can I get this to work?
My Ajax request
$.ajax({
url: '/Planner/Planner/GetTasksByDateRange',
data: { "dateFilter": dateFilter },
dataType: 'html',
success: function(RenderedTable) {
$('#plannerTable').html(RenderedTable);
}
});
This discussion has been closed.