Skip to content

Commit

Permalink
Example: Add a server-side processing example
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed May 9, 2024
1 parent 7021a47 commit 8f7bbf4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions examples/initialisation/server-side-processing.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="ajax" table-class="display nowrap" order="6">

<css lib="datatables responsive">
div.dt-container {
max-width: 600px;
margin: 0 auto;
}
</css>
<js lib="jquery datatables responsive">
<![CDATA[
$('#example').DataTable({
ajax: '../../../../examples/server_side/scripts/server_processing.php',
processing: true,
responsive: true,
serverSide: true
});
]]>
</js>

<js-vanilla>
<![CDATA[
new DataTable('#example', {
ajax: '../../../../examples/server_side/scripts/server_processing.php',
processing: true,
responsive: true,
serverSide: true
});
]]>
</js-vanilla>

<title lib="Responsive">Server-side processing</title>

<info><![CDATA[
This example shows how Responsive can be used with server-side processing in DataTables to cope with very large tables. No special considerations are required, just initialise Responsive as you normally would!
Please note that the table's container has been artificially reduced in width for this example to make sure that Responsive hides columns for the demo!
]]></info>

</dt-example>

0 comments on commit 8f7bbf4

Please sign in to comment.