Repopulate inputbox with searchCols and individual colum searching
Repopulate inputbox with searchCols and individual colum searching
kris40
Posts: 7Questions: 2Answers: 0
Hi,
I try to repopulate my inputbox with searchCols but i don't know how to make it work.
My colum searching (column 2) :
"searchCols": [
null,
{ "search": "MYSEARCH" },
],
and the repopulate :
var state = dataTable.state.loaded();
if (state) {
dataTable.columns().eq(0).each(function (colIdx) {
var colSearch = state.columns[colIdx].search;
if (colSearch.search) {
var i
for (i = 0; i < 14; i++) {
if (colIdx === i) {
$('input[name="MYINPUT_' + (i + 1) + '"]').val(colSearch.search);
}
}
}
});
}
;
any ideas ? thanks
This discussion has been closed.