0

I am implementing data-table and using MongoDb, Angular-Js. Data-table displaying max to max 1000 row. If API has 999 records then displaying 999 row, If API has 1001 then only displaying 1000 row. If API has 2000 Then also it is displaying 1000.

$scope.standardOptions = DTOptionsBuilder
   .fromFnPromise(R.all('----api call--').getList())
   .withDOM("<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-12 hidden-xs'l>r>" +
   "t" +
   "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>")
   .withBootstrap();

$scope.standardColumns = [               
   DTColumnBuilder.newColumn('flightNo').withOption('defaultContent', '-'),
   DTColumnBuilder.newColumn('eta').renderWith(dataRendererETA).withOption('defaultContent', '-'),
   DTColumnBuilder.newColumn('etd').renderWith(dataRendererETA).withOption('defaultContent', '-'),        
];

HTML

      <div class="widget-body no-padding">
              <table datatable dt-options="datatables.standardOptions" dt-columns="datatables.standardColumns" class="table table-striped table-bordered table-hover" width="100%">
                <thead>
                  <tr>
                    <th>Flight no.</th>
                    <th>eta</th>
                    <th> etd</th>                  

                  </tr>
                </thead>
              </table>
         </div>

My some API has more than 1000 records So how can I get all record in data-table.

enter image description here

Varun Sharma
  • 4,632
  • 13
  • 49
  • 103
  • 1
    Since this is about a nodejs (I believe) script running serverside you should post that code. It has nothing to do with client side nor DataTables, except the possibility of the `R` service is limiting the number of rows intentionally. Look in your nodejs script, you probably have `db.collection.find().limit(1000)` or something like that, some where. – davidkonrad Nov 30 '17 at 07:34
  • Are you completely sure `R.all('----api call--').getList()` return more than 1000 records? – davidkonrad Nov 30 '17 at 07:43
  • I don't think Angular has something to do with the returned row count. – VTodorov Nov 30 '17 at 07:49
  • can we do some callback function. I don't have good knowledge of javacript. – Varun Sharma Nov 30 '17 at 08:25
  • Have you come any further? Try just make the call some where else in the code and console out the result, or length of the result. – davidkonrad Dec 01 '17 at 07:20

0 Answers0