mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-19 17:54:14 +01:00
DEV more unit tests and more examples read
This commit is contained in:
parent
c1ae2747f2
commit
ec585db978
@ -1 +1 @@
|
||||
cbc6830a1c9581f6137b1c7be946dc875897285b
|
||||
f3f84c92698f2df79e4b4ae954d01b7ba9e59068
|
||||
|
@ -34,7 +34,7 @@ $(document).ready(function() {
|
||||
<h1>DataTables example <span>Custom data source property</span></h1>
|
||||
<div class="info">
|
||||
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the <code>data</code> parameter of a returned object (e.g.
|
||||
<code>{ "data": [...] }</code>). This can easily be change by using the <code>dataSrc</code> option of the <a href=
|
||||
<code>{ "data": [...] }</code>). This can easily be changed by using the <code>dataSrc</code> option of the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax</code></a> initiation option.</p>
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title="DataTables initialisation option">ajax.dataSrc</code></a> has a number
|
||||
of ways in which it can be used:</p>
|
||||
@ -46,7 +46,7 @@ $(document).ready(function() {
|
||||
</ul>
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
|
||||
"DataTables initialisation option">ajax.dataSrc</code></a> being used as a string to get the data from a different source property, in this case <code class=
|
||||
"string" title="String">demo</code> but it could be any value, included a nested property by using standard dotted Javascript object notation.</p>
|
||||
"string" title="String">demo</code>, but it could be any value, including a nested property using standard dotted Javascript object notation.</p>
|
||||
<p>For more details on loading a DataTable with Ajax data, please refer to the <a href="https://datatables.net/manual/ajax">Ajax section of the manual</a>.</p>
|
||||
</div>
|
||||
<div class="demo-html"></div>
|
||||
|
@ -58,7 +58,7 @@ $(document).ready(function() {
|
||||
bit of information about it in an <code>alert</code> box. This is a simple use case, but it can be built up to be arbitrarily complex.</p>
|
||||
<p>Note also that the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
|
||||
"DataTables initialisation option">columns.data</code></a> option for the column has been set to <code>null</code> to indicate that the column has no information
|
||||
that should be obtained data source object.</p>
|
||||
contained in the data source object.</p>
|
||||
</div>
|
||||
<div class="demo-html"></div>
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
|
@ -37,7 +37,7 @@ $(document).ready(function() {
|
||||
advanced configuration such as altering how the Ajax request is made. See the <a href="//datatables.net/reference/option/ajax"><code class="option" title=
|
||||
"DataTables initialisation option">ajax</code></a> documentation or the other Ajax examples for DataTables for further information.</p>
|
||||
<p>By default DataTables will assume that an array data source is to be used and will read the information to be displayed in each column from the row's array
|
||||
using the column index, making working with arrays very simple (note that this can be changed, or objects used may using the <a href=
|
||||
using the column index, making working with arrays very simple (note that this can be changed, or objects may use the <a href=
|
||||
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data</code></a> option, shown in other
|
||||
examples).</p>
|
||||
<p>The example below shows DataTables loading data for a table from arrays as the data source, where the structure of the row's data source in this example is:</p>
|
||||
|
@ -17,13 +17,13 @@
|
||||
<h1>DataTables example <span>Server-side processing</span></h1>
|
||||
<div class="info">
|
||||
<p>There are many ways to get your data into DataTables, and if you are working with seriously large databases, you might want to consider using the server-side
|
||||
options that DataTables provides. With server-side processing enabled, all paging, searching, ordering etc actions that DataTables performs are handed off to a
|
||||
server where an SQL engine (or similar) can perform these actions on the large data set (after all, that's what the database engine is designed for!). As such,
|
||||
each draw of the table will result in a new Ajax request being made to get the required data.</p>
|
||||
options that DataTables provides. With server-side processing enabled, all actions that DataTables performs (such as paging, searching and ordering) are handed off
|
||||
to a server where an SQL engine (or similar) can perform these actions on the large data set (after all, that's what the database engine is designed for!). As
|
||||
such, each draw of the table will result in a new Ajax request to get the required data.</p>
|
||||
<p>Server-side processing is enabled by setting the <a href="//datatables.net/reference/option/serverSide"><code class="option" title=
|
||||
"DataTables initialisation option">serverSide</code></a> option to <code>true</code> and providing an Ajax data source through the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax</code></a> option.</p>
|
||||
<p>The examples in this section shows server-side processing in use and how it can be customised to suit your needs.</p>
|
||||
<p>The examples in this section show server-side processing in use and how it can be customised to suit your needs.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -59,8 +59,8 @@ $(document).ready(function() {
|
||||
each draw.</p>
|
||||
<p>This is shown in this demo, which uses a unique ID assigned to the TR element (this is done automatically through the use of the <code>DT_RowId</code> special
|
||||
property returned as part of the object given by the server for each row) to track which rows are selected and reselect them is appropriate on a draw.</p>
|
||||
<p>If you are looking for a more complete and easier to use row selection option, check out the <a href="https://datatables.net/extras/select">Select extension</a>
|
||||
provides an API that is fully integrated with DataTables for selecting rows and acting upon those selected rows.</p>
|
||||
<p>If you are looking for a more complete and easier to use row selection option, the <a href="https://datatables.net/extras/select">Select extension</a> provides
|
||||
an API that is fully integrated with DataTables for selecting rows and acting upon that selection.</p>
|
||||
</div>
|
||||
<div class="demo-html"></div>
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
|
@ -33,9 +33,9 @@ $(document).ready(function() {
|
||||
<h1>DataTables example <span>Server-side processing</span></h1>
|
||||
<div class="info">
|
||||
<p>There are many ways to get your data into DataTables, and if you are working with seriously large databases, you might want to consider using the server-side
|
||||
options that DataTables provides. With server-side processing enabled, all paging, searching, ordering etc actions that DataTables performs are handed off to a
|
||||
server where an SQL engine (or similar) can perform these actions on the large data set (after all, that's what the database engine is designed for!). As such,
|
||||
each draw of the table will result in a new Ajax request being made to get the required data.</p>
|
||||
options that DataTables provides. With server-side processing enabled, all actions that DataTables performs (such as paging, searching and ordering) are handed off
|
||||
to a server where an SQL engine (or similar) can perform these actions on the large data set (after all, that's what the database engine is designed for!). As
|
||||
such, each draw of the table will result in a new Ajax request to get the required data.</p>
|
||||
<p>Server-side processing is enabled by setting the <a href="//datatables.net/reference/option/serverSide"><code class="option" title=
|
||||
"DataTables initialisation option">serverSide</code></a> option to <code>true</code> and providing an Ajax data source through the <a href=
|
||||
"//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax</code></a> option.</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user