0

can anyone help me in Creating Next and Previous Paging for SharePoint List Using Sp-services With Client Side Template Binding .

Below is the Code Which I was Using.

$().SPServices({
  operation: "GetListItems",
  async: false,
  listName: "EMail",
  CAMLQuery: queryText,
CAMLRowLimit: 15,
  completefunc: function (xData, Status) {
     var pageindex=$(xData.responseXML).SPFilterNode("rs:data").attr("ListItemCollectionPositionNext");
var present_page_items=$(xData.responseXML).find("z\\:row").size();
$('#endindex').empty().append(present_page_items);
var remaining_items=Total_listitems-present_page_items;
Total_listitems=0; $(xData.responseXML).find("z\\:row").each(function(i,k) { 
         var thisID = $(this).attr("ows_ID");
         var FAd=$(this).attr("ows_From");
         var I_att=$(this).attr("ows_Attachments");
        var I_Sub="";
        if($(this).attr("ows_Title")){
        I_Sub=$(this).attr("ows_Title");
        }
         var I_Redt=$(this).attr("ows_ReceviedDateTime");var M_Ftr="<tr id='mailitem"+thisID+"'><td class='m-sm'><div class='ckbox ckbox-success'><input id='checkbox"+thisID+"' data-uniqueid="+thisID+" type='checkbox'><label for='checkbox"+thisID+"'></label></div></td><td class='xl-sm'><div class='media'><div class='media-body'><span class='media-meta pull-right'>"+I_Redt+"</span><h4 class='text-primary'>"+FAd+"</h4><p class='email-summary'>"+I_Sub+"</p></div></div></td</tr>";$(mailcontainer).append(M_Ftr);  });}});

1 Answer 1

1

This is not related to SPServices but does the job and it is very simple. http://code.msdn.microsoft.com/office/SharePoint-JSOM-list-5104ca92

I used knockout.js to bind the data to UI. it works pretty well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.