1

We have used JQuery datatable for showing contacts. Currently we have 2500 records(approx) and around 25-30 data columns. Also, admin can add as much dynamic columns as he need.

We have a section called 'Customize View' where Datatable view can be customized by selecting which columns to be shown on frontend.

The challenge is, We have to show all column filters (30-35 static and dynamic columns) and filtration should work for all columns. To achieve this, we have brought all approx 30-35 cols and showing only those which are selected in 'customize view' section.

Also, there is a provision to edit the data on the go. Hence we have created two spans, one as td_show and one as td_edit. and we toggle this while editing records.

Now, The issue is, it works well for 100-250 records. But, takes a lot of time (around 3 minutes) to load 2500 records with showing 10-12 selected columns out of 30-35 columns.

We need to load the datatable quickly by managing all these mentioned functionalities: 1. Filters for all static and dynamic columns 2. Show only selected columns based on Customized View 3. Inline editing of data without reloading the page.

Hence, this was the major concern for not choosing the ajax datatable. Can anyone please suggest, What would be the best possible way to fix this up?

Thank you.

  • You could use [server-side processing](https://datatables.net/manual/data/#Server-side-processing) or try using [`deferRender`](https://datatables.net/reference/option/deferRender) option. – Gyrocode.com May 26 '17 at 13:01
  • Thanks @Gyrocode.com Will it work for server side html view from ajax instead of txt/json? – Ninad Nagwekar May 26 '17 at 13:49
  • You would need to use SSP class (`examples/server_side/scripts/ssp.class.php`) and handler (`examples/server_side/scripts/server_processing.php`) included in DataTables distribution to correctly handle requests. From client-side perspective it should work the same, but the performance will be much better because only one page data is transferred between client and server. – Gyrocode.com May 26 '17 at 14:35

0 Answers0