forked from DataTables/Responsive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example: Add a server-side processing example
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |