Skip to content

loadNext

sends a request to load the specified number of records to the end of the client-side dataset or to the specified position

function loadNext(
// the number of records fetch
count: number,
// the start position to load data from
start: number,
// the callback function
callback: function,
// the data url
url: string,
// specifies whether the incoming data request should be satisfied immediately. If it's set to "true" the "datathrottle" property will be ignored.
now: boolean,
// if true, the current data are erased before new data are loaded
clear?: boolean
): promise

promise the result of a request

grida.loadNext(10,0,null,"data/data.php");
grida.loadNext(10,0,null,"data/data.php").then(function(){
this.showItem(903);
});

also check the next samples:

The method returns a promise that:

  • is resolved when the data are loaded
grida.loadNext(10,0,null,"data/data.php").then(function(data){
var json = data.json();
});
  • is rejected if a loading error occurs or if you attempt to request the same portion of data
grida.loadNext(10,0,null,"data/data.php").catch(function(){
// your code here
});