Hello,
I’m using v.3.6 build 131108 of dhtmlxSuite Pro.
When a record is modified in a dhtmlxgrid, i reload one or many records with loadXMLString function.
If i don’t split the grid, everything is ok.
When i’m using splitat function, only the right part of the split is refresh.
How can i refresh too the left part of the split ?
I use dhtmlxRemoveFilter and dhtmlxRestoreFilter otherwise nothing works.
Here the code :
function dhtmlxRemoveFilter() {
grid.detachEvent(dhtmlxEventOnFilterEndId);
/* for (var i=0;i<grid.filters.length;i++){
grid.filterBy(i,""); //unfilters the grid
}*/
var num_cols = grid.getColumnCount();
for (var col_idx=0; col_idx<num_cols; col_idx++) {
var filter = grid.getFilterElement(col_idx);
if (filter && filter.value!="") { // not all columns may have a filter
grid.filterBy(col_idx,""); //unfilters the grid
}
}
grid._f_rowsBuffer = null; //clears the cache
return true;
}
//------------------------------------------------------------------------------
function dhtmlxRestoreFilter() {
dhtmlxLoadCookieFilter();
dhtmlxEventOnFilterEndId=grid.attachEvent("onFilterEnd", dhtmlxEventOnFilterEnd);
}
//------------------------------------------------------------------------------
function dhtmlxLoadCookieFilter() {
// cookies to filter vals
var cookie_prefix = "MRoad_filter_";
var num_cols = grid.getColumnCount();
var filter_ok = false;
for (var col_idx=0; col_idx<num_cols; col_idx++) {
var filter = grid.getFilterElement(col_idx);
if (filter) { // not all columns may have a filter
var col_id = grid.getColumnId(col_idx);
var filter_val = getCookie(cookie_prefix+col_id);
if (filter_val) {
filter.value = filter_val;
filter_ok=true;
}
}
}
if (filter_ok) {
grid.filterByAll();
}
return true;
}
function getXmlObject(tag,tagName){
tagElements=tag.getElementsByTagName(tagName);
if (tagElements.length==1){
return tagElements[0].outerHTML;
///return tagElements;
} else {
return null;
}
function onAfterUpdateDataProcessor(id, action, tid, tag) {
newRows= getXmlObject(tag,"rows");
dhtmlxRemoveFilter();
grid._refresh_mode=[true,true,false];
grid.loadXMLString(newRows);
dhtmlxRestoreFilter();
}
I apologize for the delay.
Unfortunately the issue still cannot be reproduced locally.
Could you please, provide with a complete demo or share with a demo link where the problem can be reconstructed.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan