scroller with ajax function

scroller with ajax function

truefunruntruefunrun Posts: 2Questions: 2Answers: 0
edited June 2016 in Free community support

Hi guys, I have some problem with callback function in ajax function

            ajax: function (data, callback, settings) {
   callback(
                    {
                        recordsTotal:array.length,
                        recordsFiltered:array.length,
                        data:(function(){
                            var shortArray = [];
                            for(var i=data.start;i<data.length;i++){
                                shortArray.push(array[i]);
                            }
                            return shortArray;
                        })()
                    }
                );
           }

I know, that first request must contain headers and full count rows. Where I must will be set this full count rows from server?
With this problem in ajax function , "data" contain properties "start" and "length". Default start will be 0 and length will be ~25.
start = skip, length = take

This discussion has been closed.