客户端分页与$ top问题

时间:2016-06-21 23:42:59

标签: javascript c# sharepoint-2013

我有这些网址,我想将$ top = 1000用于旁边分页,因为这些问题:Sharepoint question但是当我使用它时我的列表捕获错误

function GalleryContentPopulate(url, listname, target) {

var eng = false;
var queryGallery = "$select=Title,Description,Enlace,EncodedAbsUrl,Categoria/Title&$expand=Categoria/Title";

if ((window.location.href.indexOf("lang=en") > 0)) {
    queryGallery = "$select=TitleEnglish,DescriptionEnglish,Enlace,EncodedAbsUrl,Categoria/English&$expand=Categoria/English";
    eng = true;
}
// Getting our list items
 $.ajax({
    url: url + "/_api/web/lists/getbytitle('" + listname + "')/items?$top=1000" + queryGallery, 
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
        completeGalleryContent(data, target, eng);
    },
    error: function (data) {
        failureGalleryContent(data, target);
    }
});
}

那么我的查询应如何运作?

0 个答案:

没有答案