Serialize seems to be working fine except when I have a filter applied. Then it only seems to be serializing the rows that match the currently selected filter. Is there a way that I can tell serialize to serialize the entire table regardless of search or filter selection? or is there a way that I can programmatically clear any search or filter selections?
This is expected behavior. serialize() method serialize only rendered rows. To serialize all rows when grid is in filtering mode you should unfilter grid:
for (var i=0; i<mygrid.getColumnsNum()-1; i++){
if (mygrid.getFilterElement(i)&&mygrid.getFilterElement(i).value) mygrid.filterBy(i,"");
}
I attempted to clear the filters by adding the following command before I serialize:
gridEditMembers.filterBy(0, “”);
This at first seemed to work, as not my entire table was being serialized. However, now the data that is serialized does not include my changes. It is as if all my table edits had been reverted.
I utilized your method for clearing the filters and had teh same result. My changes are being lost when I clear the filters.
Try to use following code:
for (var i=0; i<mygrid.getColumnsNum()-1; i++){
if (mygrid.getFilterElement(i)&&mygrid.getFilterElement(i).value){
mygrid.filterBy(i,"");
mygrid._f_rowsBuffer = null;
}
}
Thank you for your response and help.
Unfortunately, that did not seem to fix my problem. Any other ideas?
However, now the data that is serialized does not include my changes. It is as if all my table edits had been reverted.
Issue is related to the
viewtopic.php?f=2&t=13040