DataTables cell selection in a footer

DataTables cell selection in a footer

DevWDevW Posts: 1Questions: 1Answers: 0

We have a DataTables table with lots of jQuery manipulation built on top of it. We have an 'Insert' row in the footer and would like all of our code to be applied to cells in that row in the same way as cells in the rest of the table. For example, when user clicks a '.date' cell, it turns into a datepicker, etc.
When running the jQuery, it's necessary to set the selected cell so that the plugin knows which one we're dealing with. We do this using:

selectedCell = dataTable.cell(element);
cellColumn = selectedCell.index().column;
cellRow = selectedCell.index().row;
aRowData = dataTable.row(cellRow).data();
orderID = aRowData['DT_RowId'];
selectedField = aFields[cellColumn];
var selectedCellNode = selectedCell.node();

However, dataTables does not recognize these commands when the code is run from a table tfooter td cell. Get the following error:

               "Uncaught TypeError: Cannot read property 'column' of undefined" 

I tried using table.footer(), column.footer(), etc but those just returned html(). I want to actually set this as the 'selected cell' so that I can manipulate it using dataTables functions, as I do for all others.

Is this possible?

Thank you very much.

This discussion has been closed.