Datatables Sharepoint Server Side

Datatables Sharepoint Server Side

ghubarighubari Posts: 1Questions: 1Answers: 0

Hi
I am new in Data tables
I am trying to get dynamic data from sharePoint 2013 list contain 50,000 item using below code

$(document).ready(function () {

             $("#example").DataTable({ 
                        "bProcessing": true,
                        "bserverSide": true,
                        "ajax" :{                                   
                                         "url" :"http://Servername/admin/_vti_bin/listdata.svc/Administration",
                             "type": "GET",            
                              "dataType": "json",   
                               "headers": {   Accept: "application/json;odata=verbose"        },

                                     "success" :function(data) 
                                              {                                             
                                               myData = data.d.results; 
                                               alert("hi"); 
                                              },
                                              "error": function(data) 
                                              {                                             

                                               alert("bye"); 
                                              }


                                },

                              "data":  myData ,                  
                           "columns": [

                                            { data: "ID",title:"ID", },
                                                    { data: "Created",title:"Created", },
                           { data: "Title",title:"Description", },
                                        ],

                                                       });            


     })

Could you please help me to solve the issue of my code

Answers

  • bvelasquezbvelasquez Posts: 28Questions: 7Answers: 0

    other than making a different type of ajax with filters call I don't know there if there is a bypass to the view threshold limitation. old post, but if anyone is looking at this code, the "Accept" needs to be in quotes and you are definitely not able to override the success function when using datatables ~ see documentation.

This discussion has been closed.