Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by qq_cn on Sep 14, 2009 03:15
open dhtmlx forum
enableSmartRendering row not exists

hello,use enableSmartRendering turn on,i had 300 records in grid

  grid.attachFooter("<div id=AllRowsValue>countValue:0</div>");

 handler js is function sumAllRowsValue(){

var numbers=grid.getRowsNum()==""||grid.getRowsNum==null?0:grid.getRowsNum;

var countValues;

grid.forEachRow(function xyz(row_id) {

countValues=countValue+grid.cells(row_id,0).getValue();

});

window.document.getElementById(''AllRowsValue).value=countValues;

}

  when excute the sumAllRowsValue function,it always throws row is not exits ?

 how to make it ,please ?

                                   best wishes for you.

    qq_cn

 

Answer posted by dhxSupport on Sep 14, 2009 03:24
Please make sure if you are calling sumAllRowsValue() function only after all rows was loaded:
mygrid.load(url,function(){
 sumAllRowsValue()
})
There is no way to get cell value if row wasn't loaded from the server side yet.