Getting current table settings

Getting current table settings

gd52gd52 Posts: 1Questions: 0Answers: 0
edited September 2012 in Feature requests
I need to save the current settings for pagelength, startdisplayitem and current filter.
I am currently digging them out of the DOM, but it would be nicer if there was a "sanctioned" way to do this.
Below is an example of what I have to do (using some custom DOM methods, but you should catch the drinf)

var odiv = document.getElementById("data_length");
var oSelect = $walk(odiv, "dd");
__p.pageLength = ml.dom.getValue(oSelect);

__p.pageStart = mainTable.DataTable.settings[0]._iDisplayStart;

var o = $el("data_filter");
o = ml.dom.walk(o, "dd");
__p.filter = ml.dom.getValue(o);


  • allanallan Posts: 61,585Questions: 1Answers: 10,084 Site admin
    The fnPagingInfo plug-in ( ) is the way to do it for paging. There isn't currently an equivalent plug-in for filtering, but the data store object in DataTables is the oSearch parameter with this model: - if anyone fancies creating a similar plug-in :-)

This discussion has been closed.