How can I easily convert an html5 attribute driven datatable to serverSide Processing?

How can I easily convert an html5 attribute driven datatable to serverSide Processing?

jeremysawesomejeremysawesome Posts: 5Questions: 3Answers: 0

A few years ago we built out a DataTables solution that uses HTML-5 Attributes. It's working really well and we love the current functionality. Recently, we've had some concerns about performance, mainly load times. It takes some time to load in larger datasets.

We're looking for a solution that:
1. Allows us to continue returning HTML-5 table rows using the HTML-5 Attribute driven system we already use.
2. Enables us to back load information using multiple ajax calls (returning html-5 attribute driven tr's) into the DataTable such that we can continue using the client side filtering and sorting capabilities.

We found the serverSide option which, on the surface, sounds like it could give us what we want. However, I haven't seen any options that will allow us to continue using the HTML-5 attribute solution we currently use. I also haven't seen any options that will allow us to continue to benefit from DataTables client-side filtering solutions. Basically, it sounds like swapping to serverSide removes many of the pro's of using DataTables in the first place.

The main concern is that by swapping to serverSide we will essentially have to re-implement our backend.

Given that background information.

Is there a DataTable solution out there for this use case?

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    With server side processing enabled all the sorting, searching and paging functions at at the server script.

    I also haven't seen any options that will allow us to continue to benefit from DataTables client-side filtering solutions.

    Depends on the client-side filtering options you are referring to. In general you are correct. SearchPanes and SearchBuilder have server side processing support. If you have column filtering the search terms will be sent to the server. Search plugins and HTML 5 attributes won't be used. Depending on your backend you can use the Editor libraries for server side processing.

    This FAQ explains options to help with performance.

    HTML 5 data attributes for sorting and searching are supported with DOM sourced tables. Datatables doesn't support using HTML 5 attributes for sorting and searching when using ajax loaded data. More info here.

    Kevin

Sign In or Register to comment.