Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Satya on Oct 17, 2007 22:10
open dhtmlx forum
I am using XMLAutoLoading to load large data. I want to go to a page which is not loaded yet. Can we do this by any script like the one u given for smart rendering.

Answer posted by Stanislav on Oct 18, 2007 05:03
Because autoloading use linear buffer its a bit more complex task, because it can require few data loads, code may look similar to next


var g_load_event=null;

functon go_to_row(index){
    if (index>this.getRowsNum()){
       //need to load next XML chunk
       if (!g_load_event)
           g_load_event=grid.attachEvent("onXLE",function(){ go_to_row(index); });
       while(grid.addRowsFromBuffer());
    }else{
       //already exist in buffer
       if (g_load_event)
          grid.detachEvent(g_load_event);
       while(grid.addRowsFromBuffer(true));
       grid.selectRow(index);
    }
}