Problem with feature enablement
Problem with feature enablement
I am trying to dis/enable feature after the table has been initialised. I see some strange behaviour.
As long as i dont set any features the table appears as expected. This is part of the code:
[code]
$(document).ready(function(){
getBackendData(aktienaam2,tabelid2,tabelnavid2);
function getBackendData(aktie,tabelid,tabelnavid) {
jQuery.getJSON(dblocation + "wqsGetData?openagent&action=" + aktie + sessieparameters + "&callback=?",
function(data) {
notesData = data;
if (data.error){alert(data.error);return false;}
$(tabelid).html(''+ data.gegevens).show();
$(data.tabelid)
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $(tabelnavid)});
addDetailListener(notesData.tabelid);
}
);
}
});
[/code]
Now if i change the code to this :
[code]
$(document).ready(function(){
getBackendData(aktienaam2,tabelid2,tabelnavid2);
function getBackendData(aktie,tabelid,tabelnavid) {
jQuery.getJSON(dblocation + "wqsGetData?openagent&action=" + aktie + sessieparameters + "&callback=?",
function(data) {
notesData = data;
if (data.error){alert(data.error);return false;}
$(tabelid).html(''+ data.gegevens).show();
$(tabelid).dataTable( {
"bPaginate":false,
} );
$(data.tabelid)
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $(tabelnavid)});
addDetailListener(notesData.tabelid);
}
);
}
});
[/code]
The result is two search boxes and two lines Showing .. of .. entries
I have been trying to understand who this works, but I have no clue how to proceed.
As long as i dont set any features the table appears as expected. This is part of the code:
[code]
$(document).ready(function(){
getBackendData(aktienaam2,tabelid2,tabelnavid2);
function getBackendData(aktie,tabelid,tabelnavid) {
jQuery.getJSON(dblocation + "wqsGetData?openagent&action=" + aktie + sessieparameters + "&callback=?",
function(data) {
notesData = data;
if (data.error){alert(data.error);return false;}
$(tabelid).html(''+ data.gegevens).show();
$(data.tabelid)
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $(tabelnavid)});
addDetailListener(notesData.tabelid);
}
);
}
});
[/code]
Now if i change the code to this :
[code]
$(document).ready(function(){
getBackendData(aktienaam2,tabelid2,tabelnavid2);
function getBackendData(aktie,tabelid,tabelnavid) {
jQuery.getJSON(dblocation + "wqsGetData?openagent&action=" + aktie + sessieparameters + "&callback=?",
function(data) {
notesData = data;
if (data.error){alert(data.error);return false;}
$(tabelid).html(''+ data.gegevens).show();
$(tabelid).dataTable( {
"bPaginate":false,
} );
$(data.tabelid)
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $(tabelnavid)});
addDetailListener(notesData.tabelid);
}
);
}
});
[/code]
The result is two search boxes and two lines Showing .. of .. entries
I have been trying to understand who this works, but I have no clue how to proceed.
This discussion has been closed.
Replies
It is sort of possible with 1.7 (currently in beta) since you now have the option to have the table destroyed (if one already exists) and then initialised with new parameters. http://datatables.net/new/1.7 (see the "DataTables object retrieval" section).
Allan