Getting current table settings
Getting current table settings
![gd52](https://secure.gravatar.com/avatar/a5e43f4829e01ec14dc5c315c6f9e135/?default=https%3A%2F%2Fvanillicon.com%2Fa5e43f4829e01ec14dc5c315c6f9e135_200.png&rating=g&size=120)
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);
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);
This discussion has been closed.
Replies
Allan