<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>DataTables 1.9 — DataTables forums</title>
        <link>https://datatables.net/forums/</link>
        <pubDate>Tue, 09 Jun 2026 04:46:33 +0000</pubDate>
        <language>en</language>
            <description>DataTables 1.9 — DataTables forums</description>
    <language>en</language>
    <atom:link href="https://datatables.net/forums/categories/datatables-1-9/p2/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Datatables IP-address sorting "full example"</title>
        <link>https://datatables.net/forums/discussion/71027/datatables-ip-address-sorting-full-example</link>
        <pubDate>Sat, 25 Dec 2021 05:17:18 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>hazemshoeib</dc:creator>
        <guid isPermaLink="false">71027@/forums/discussions</guid>
        <description><![CDATA[<p>I am very new to html/javascript and I am struggling to have this fixed, would you please help!! I am trying to use DataTables jQuery plugin for sorting an IP-address column. I found followed many resources and but I couldn't full apply them as there is no full solution provided. I don't have a clue on how to define this column with the correct type:</p>

<pre><code>"aoColumns": [
    null,
    { "sType": 'string-ip' },
    null
    ],
</code></pre>

<p>can someone fix the below code please?</p>

<pre><code>&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;Create jquery databable easily&lt;/title&gt;
    &lt;script src="https://code.jquery.com/jquery-3.5.1.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdn.datatables.net/plug-ins/1.11.3/sorting/ip-address.js"&gt;&lt;/script&gt;
    &lt;script&gt;
        $(document).ready(function() {
            $('#example').DataTable({
            });
            });
        

    &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
    &lt;h2&gt;Create jquery datatable easily&lt;/h2&gt;
    
&lt;/body&gt;
&lt;table id="example" class="display" style="width:100%"&gt;
        &lt;thead&gt;
            &lt;tr&gt;
                &lt;th id=name&gt;Name&lt;/th&gt;
                &lt;th&gt;Position&lt;/th&gt;
                &lt;th&gt;Office&lt;/th&gt;
                &lt;th&gt;Age&lt;/th&gt;
                &lt;th id=ipaddress sType=string-ip&gt;IP-Address&lt;/th&gt;
                &lt;th&gt;Salary&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
            &lt;tr&gt;
                &lt;td&gt;Tiger Nixon&lt;/td&gt;
                &lt;td&gt;System Architect&lt;/td&gt;
                &lt;td&gt;Edinburgh&lt;/td&gt;
                &lt;td&gt;61&lt;/td&gt;
                &lt;td&gt;10.29.0.36&lt;/td&gt;
                &lt;td&gt;$320,800&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Garrett Winters&lt;/td&gt;
                &lt;td&gt;Accountant&lt;/td&gt;
                &lt;td&gt;Tokyo&lt;/td&gt;
                &lt;td&gt;63&lt;/td&gt;
                &lt;td&gt;172.29.0.78&lt;/td&gt;
                &lt;td&gt;$170,750&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Ashton Cox&lt;/td&gt;
                &lt;td&gt;Junior Technical Author&lt;/td&gt;
                &lt;td&gt;San Francisco&lt;/td&gt;
                &lt;td&gt;66&lt;/td&gt;
                &lt;td&gt;172.29.0.98&lt;/td&gt;
                &lt;td&gt;$86,000&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Cedric Kelly&lt;/td&gt;
                &lt;td&gt;Senior Javascript Developer&lt;/td&gt;
                &lt;td&gt;Edinburgh&lt;/td&gt;
                &lt;td&gt;22&lt;/td&gt;
                &lt;td&gt;172.29.0.47&lt;/td&gt;
                &lt;td&gt;$433,060&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Airi Satou&lt;/td&gt;
                &lt;td&gt;Accountant&lt;/td&gt;
                &lt;td&gt;Tokyo&lt;/td&gt;
                &lt;td&gt;33&lt;/td&gt;
                &lt;td&gt;172.29.0.56&lt;/td&gt;
                &lt;td&gt;$162,700&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Brielle Williamson&lt;/td&gt;
                &lt;td&gt;Integration Specialist&lt;/td&gt;
                &lt;td&gt;New York&lt;/td&gt;
                &lt;td&gt;61&lt;/td&gt;
                &lt;td&gt;172.29.0.2&lt;/td&gt;
                &lt;td&gt;$372,000&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Herrod Chandler&lt;/td&gt;
                &lt;td&gt;Sales Assistant&lt;/td&gt;
                &lt;td&gt;San Francisco&lt;/td&gt;
                &lt;td&gt;59&lt;/td&gt;
                &lt;td&gt;172.29.0.223&lt;/td&gt;
                &lt;td&gt;$137,500&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Rhona Davidson&lt;/td&gt;
                &lt;td&gt;Integration Specialist&lt;/td&gt;
                &lt;td&gt;Tokyo&lt;/td&gt;
                &lt;td&gt;55&lt;/td&gt;
                &lt;td&gt;172.29.0.20&lt;/td&gt;
                &lt;td&gt;$327,900&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Colleen Hurst&lt;/td&gt;
                &lt;td&gt;Javascript Developer&lt;/td&gt;
                &lt;td&gt;San Francisco&lt;/td&gt;
                &lt;td&gt;39&lt;/td&gt;
                &lt;td&gt;172.29.0.13&lt;/td&gt;
                &lt;td&gt;$205,500&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Sonya Frost&lt;/td&gt;
                &lt;td&gt;Software Engineer&lt;/td&gt;
                &lt;td&gt;Edinburgh&lt;/td&gt;
                &lt;td&gt;23&lt;/td&gt;
                &lt;td&gt;172.29.0.113&lt;/td&gt;
                &lt;td&gt;$103,600&lt;/td&gt;
            &lt;/tr&gt;
        &lt;/tbody&gt;
        &lt;tfoot&gt;
            &lt;tr&gt;
                &lt;th&gt;Name&lt;/th&gt;
                &lt;th&gt;Position&lt;/th&gt;
                &lt;th&gt;Office&lt;/th&gt;
                &lt;th&gt;Age&lt;/th&gt;
                &lt;th&gt;IP-address&lt;/th&gt;
                &lt;th&gt;Salary&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/tfoot&gt;
    &lt;/table&gt;
&lt;/html&gt;
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Can not download datatable editor 1.79.6 for nodeJS. Unknown package type</title>
        <link>https://datatables.net/forums/discussion/70895/can-not-download-datatable-editor-1-79-6-for-nodejs-unknown-package-type</link>
        <pubDate>Fri, 10 Dec 2021 01:09:28 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>yokowasis</dc:creator>
        <guid isPermaLink="false">70895@/forums/discussions</guid>
        <description><![CDATA[<p>Server error ?</p>
]]>
        </description>
    </item>
    <item>
        <title>Import CSV Multirow Has The Same Value after SetValue on PreCreate</title>
        <link>https://datatables.net/forums/discussion/70766/import-csv-multirow-has-the-same-value-after-setvalue-on-precreate</link>
        <pubDate>Tue, 30 Nov 2021 06:06:40 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>Showa Indonesia Mfg</dc:creator>
        <guid isPermaLink="false">70766@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Description of problem</strong>:</p>

<p>Programming language: PHP</p>

<p>I'm using import csv via datatable and need process in some column before insert to table. The process is to get Description by Part No.</p>

<p>But when using the preCreate event, the inserted description value is always the same value for all rows. It seems like the setValue() is updating all rows with the last value get by getPartInfo() function.</p>

<p>Is there any solution ?</p>

<p><strong>Code</strong></p>

<pre><code>                -&gt;on('preCreate', function($editor, &amp;$values) {
                    $partInfo = $this-&gt;getPartInfo($values['PART_NO'], $values['CONTRACT']);
                    $editor
                        -&gt;field('DESCRIPTION')
                        -&gt;setValue($partInfo['Description']);
</code></pre>

<p><strong>Result</strong></p>

<p><img src="https://datatables.net/forums/uploads/editor/6r/4ao35zz04n7s.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Inline editing with a checkbox cell only shows the checkbox without labels</title>
        <link>https://datatables.net/forums/discussion/70587/inline-editing-with-a-checkbox-cell-only-shows-the-checkbox-without-labels</link>
        <pubDate>Thu, 11 Nov 2021 15:24:51 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>YoDavish</dc:creator>
        <guid isPermaLink="false">70587@/forums/discussions</guid>
        <description><![CDATA[<p>Using Editor 1.9.6</p>

<p>I have inline editing enable for this column that contains 4 checkbox values. When we select the row and hit the "Edit" button it shows it somewhat correctly (although it needs some css to align it correctly), image below:</p>

<p><img src="https://datatables.net/forums/uploads/editor/ou/fna4fgaczbjh.png" alt="" title="" /></p>

<p>However, when I try to quickly access through the row, I double click into the row and I only see 4 checkboxes without the labels, Image below of the cell:</p>

<p><img src="https://datatables.net/forums/uploads/editor/43/mloc4q198uci.png" alt="" title="" /></p>

<p>Is there a way to add the labels so the user can quickly access this without have to go to the "edit" button?</p>
]]>
        </description>
    </item>
    <item>
        <title>Sorting a Column Loses Background Color Formatting</title>
        <link>https://datatables.net/forums/discussion/70543/sorting-a-column-loses-background-color-formatting</link>
        <pubDate>Tue, 09 Nov 2021 14:45:39 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>mcaceresl</dc:creator>
        <guid isPermaLink="false">70543@/forums/discussions</guid>
        <description><![CDATA[<p>There is an current issue where you set a background color on a cell and then sorting a column, it loses the background color you've already defined it. There are another post that help me but I have to do some modification to work for my script:<br />
Link: <a rel="nofollow" href="https://datatables.net/forums/discussion/11627/sorting-a-column-loses-background-color-formatting">https://datatables.net/forums/discussion/11627/sorting-a-column-loses-background-color-formatting</a></p>

<p>Final solution:</p>

<p>//This is for the current css style applied for the cells:</p>

<p>}<br />
table.dataTable.display td.accuracyData1 {<br />
background-color: seagreen;<br />
}<br />
table.dataTable.display td.accuracyData0 {<br />
background-color: crimson;<br />
}</p>

<p>//This is what I have to add for the sorting of columns keep the cell format color I wanted to:</p>

<p>table.dataTable.display tbody tr.even td.accuracyData1.sorting_1 {<br />
background-color: seagreen;<br />
}<br />
table.dataTable.display tbody tr.odd td.accuracyData1.sorting_1 {<br />
background-color: seagreen;<br />
}</p>

<p>table.dataTable.display tbody tr.even td.accuracyData0.sorting_1 {<br />
background-color: crimson;<br />
}<br />
table.dataTable.display tbody tr.odd td.accuracyData0.sorting_1 {<br />
background-color: crimson;<br />
}</p>

<p>Hope this solution help someone.</p>

<p>Marco Cáceres</p>
]]>
        </description>
    </item>
    <item>
        <title>JSON encoding error:</title>
        <link>https://datatables.net/forums/discussion/67207/json-encoding-error</link>
        <pubDate>Wed, 24 Feb 2021 19:44:09 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>TeeWee</dc:creator>
        <guid isPermaLink="false">67207@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
I tried the trial version and everything worked great. Then I bought a license and installed the licensed version. Now I get a json error message without the database being touched or changed:<br />
"DataTables warning: table id = example - JSON encoding error: Malformed UTF-8 characters, possibly incorrectly encoded"</p>

<p>Any idea what to do?</p>

<p>Thanks for your help<br />
Thomas</p>
]]>
        </description>
    </item>
    <item>
        <title>qr scanner integration for search button ?</title>
        <link>https://datatables.net/forums/discussion/70364/qr-scanner-integration-for-search-button</link>
        <pubDate>Sun, 24 Oct 2021 15:24:05 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>fatihfx</dc:creator>
        <guid isPermaLink="false">70364@/forums/discussions</guid>
        <description><![CDATA[<p>How to add qr scanner for search button ?</p>

<p>I did see this (<a rel="nofollow" href="https://datatables.net/blog/2020-07-10)">https://datatables.net/blog/2020-07-10)</a><br />
but I want to add for search button.</p>

<p>Thank you.</p>
]]>
        </description>
    </item>
    <item>
        <title>Filter without displaying in search box or do on tableserver based on get parameter</title>
        <link>https://datatables.net/forums/discussion/70260/filter-without-displaying-in-search-box-or-do-on-tableserver-based-on-get-parameter</link>
        <pubDate>Thu, 14 Oct 2021 16:02:29 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>YoDavish</dc:creator>
        <guid isPermaLink="false">70260@/forums/discussions</guid>
        <description><![CDATA[<p>I have editor v 1.9.6.</p>

<p>Is ther a way to filter the datatables data such that if we pass in the url for example:</p>

<p><a rel="nofollow" href="http://myDatatables.php?number=1234&amp;accountName=place1">http://myDatatables.php?number=1234&amp;accountName=place1</a></p>

<p>the "accountName" will filter for "place1" but the value is <strong>not displayed in the search filter</strong></p>

<p>The other option I was thinking was just getting the url parameter and performing the query based off that value. I was hoping to find former options first. Any suggestions?</p>
]]>
        </description>
    </item>
    <item>
        <title>Styling</title>
        <link>https://datatables.net/forums/discussion/70031/styling</link>
        <pubDate>Mon, 27 Sep 2021 19:45:48 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>kr0401</dc:creator>
        <guid isPermaLink="false">70031@/forums/discussions</guid>
        <description><![CDATA[<p>I have taken over a project previously started by someone else and need to figure out which styling they used. I do not have access to that person to ask them. Is there a way to tell</p>

<p>The project is built with dataTables 1.9.0</p>

<p>dataTables is initialized like:</p>

<p><code>&lt;script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"&gt;&lt;/script&gt;</code><br />
<code>&lt;link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables.css"&gt;</code><br />
<code>&lt;script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/jquery.dataTables.min.js"&gt;&lt;/script&gt;</code></p>
]]>
        </description>
    </item>
    <item>
        <title>Break the column by <br />
<br />
 delimiter to distribute the values among rows.</title>
        <link>https://datatables.net/forums/discussion/69986/break-the-column-by-delimiter-to-distribute-the-values-among-rows</link>
        <pubDate>Fri, 24 Sep 2021 16:42:15 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>anshgupta1298</dc:creator>
        <guid isPermaLink="false">69986@/forums/discussions</guid>
        <description><![CDATA[<p>There are 2 columns in a row for my table. One is the key and other is the value.<br />
The value can be single or multiple. If multiple, they are separated by &lt;br&gt;. Like:</p>

<p>K1 -&gt; V1 &lt;br&gt; V2 &lt;br&gt; V3</p>

<p>Now I want to export this into an Excel file such that there will be a single row for each value. Like:</p>

<p>K1 -&gt; V1<br />
K1 -&gt; V2<br />
K1 -&gt; V3</p>

<p>I want to do this using datatables but cannot find any success. Can anyone help plz.</p>
]]>
        </description>
    </item>
    <item>
        <title>The pagination's Next button doesn't disable</title>
        <link>https://datatables.net/forums/discussion/69738/the-paginations-next-button-doesnt-disable</link>
        <pubDate>Wed, 08 Sep 2021 18:46:43 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>CamiloFranco</dc:creator>
        <guid isPermaLink="false">69738@/forums/discussions</guid>
        <description><![CDATA[<p>I made a paged table that brings me a certain amount of data and as I advance it brings me more through a server side process but the Next button does not work.</p>

<p><img src="https://datatables.net/forums/uploads/editor/y7/mp5lmh4b3o6e.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Get Filtered Data to controller</title>
        <link>https://datatables.net/forums/discussion/69659/get-filtered-data-to-controller</link>
        <pubDate>Thu, 02 Sep 2021 09:56:32 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>novatroop77</dc:creator>
        <guid isPermaLink="false">69659@/forums/discussions</guid>
        <description><![CDATA[<p>My Remit has changed and I need to be able to get the filtered data ie the data only searched and return to user to a MVC controller in asp.net is their a function like rows.data that would retain the pre existing data on the filtered level.</p>
]]>
        </description>
    </item>
    <item>
        <title>An SQL error occurred: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value ...</title>
        <link>https://datatables.net/forums/discussion/69586/an-sql-error-occurred-sqlstate-22007-invalid-datetime-format-1366-incorrect-integer-value</link>
        <pubDate>Sat, 28 Aug 2021 01:41:25 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>rmeetin</dc:creator>
        <guid isPermaLink="false">69586@/forums/discussions</guid>
        <description><![CDATA[<p>The full error (using fictitious database account name:</p>

<p>The error: An SQL error occurred: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column <code>account_table</code>.<code>galleries2</code>.<code>id</code> at row 1</p>

<p>I mostly use VestaCP for my websites but sometimes must use cPanel. All my forms execute perfectly on Vesta, complex to simple. I was updating a client's site today which runs on cPanel and I am seeing the above error on most of my forms, not all. The forms, db connection, database tables are identical.</p>

<p>The invalid datetime format makes no sense at all because these forms do no use any date fields in the forms and none of the fields are of date or datetime type. See:</p>

<pre><code>create table galleries2 
(
id int auto_increment primary key,
catid int,
title varchar(80),
gallery_type varchar(12),
rowOrder int
)
</code></pre>

<p>I have a couple similar simple forms that are working. This is feeling like something specific to cPanel and maybe even mysql or mysql configuration. Suggestions?</p>
]]>
        </description>
    </item>
    <item>
        <title>using postEdit to update main table fails</title>
        <link>https://datatables.net/forums/discussion/69433/using-postedit-to-update-main-table-fails</link>
        <pubDate>Tue, 17 Aug 2021 14:58:56 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>YoDavish</dc:creator>
        <guid isPermaLink="false">69433@/forums/discussions</guid>
        <description><![CDATA[<p>I have editor v 1.9.6.<br />
Within the postEdit fucntion on my server side PHP page, there is a logChange function that will save the old and new value for an audit log onto a new table, this works perfectly fine. However, I want to add an additional function to perform updates to the "Task" table depending on 2 column values. For instance,</p>

<p>If "TaskDefId" column = "2" and "Status" column  = "complete"<br />
it would call a new function "handleTaskStatusChange" to <strong>update the Task table to "TaskDefId" column = "8" and "Status" column = "created"</strong>, however when I run this, DataTables stalls and does not update "TaskDefId" = "8". If debug the sql and parameters, everything looks correct for the update and putting in a file_put_contents() I see it reaches the function correctly. Additionally, if I comment out "executeSql" with in the "updateTaskTable" function, then it runs smoothly again. I'm assuming it's a timing or synchronization thing for why this fails to update? How can I call this update in handleTaskStatusChange function, if not in the "postEdit" to be performed? Code is below:</p>

<p>```php<br />
&lt;?php<br />
session_start();<br />
// Task Workflow Handler<br />
include("taskWorkflowHandler.php");</p>

<p>// DataTables PHP library<br />
include ("../lib/datatables.inc.php");</p>

<p>// Alias Editor classes so they are easy to use<br />
use<br />
    DataTables\Editor,<br />
    DataTables\Editor\Field,<br />
    DataTables\Editor\Format,<br />
    DataTables\Editor\Join,<br />
    DataTables\Editor\Mjoin,<br />
    DataTables\Editor\Options,<br />
    DataTables\Editor\Upload,<br />
    DataTables\Editor\Validate,<br />
    DataTables\Editor\ValidateOptions;</p>

<p>$prevValues = [];<br />
// runs only one per row</p>

<p>function getPrevValues( $db, $table, $id ){<br />
    global $prevValues;<br />
    $prevValues = $db-&gt;select( $table, '*', [ 'id' =&gt; $id ] )-&gt;fetch();<br />
}</p>

<p>function logChange( $db, $table, $action, $id, $values) {<br />
    date_default_timezone_set('America/Chicago');<br />
    global $prevValues;<br />
    switch ($action) {<br />
        case "create":<br />
            $oldValues = [];<br />
            $newValues = $values;<br />
            break;<br />
        case "edit":<br />
            $oldValues = array_intersect_key(array_diff_assoc($prevValues,$values[$table]),array_diff_assoc($values[$table],$prevValues));<br />
            $newValues = array_intersect_key(array_diff_assoc($values[$table],$prevValues),array_diff_assoc($prevValues,$values[$table]));<br />
            break;<br />
        case "delete":<br />
            $oldValues = $prevValues;<br />
            $newValues = [];<br />
            break;<br />
    }</p>

<pre><code>if (!empty($oldValues) || !empty($newValues)){
    foreach($oldValues as $oKey =&gt; $oValue){
        foreach($newValues as $nKey =&gt; $nValue){
            if($oKey == $nKey){ // only insert if the keys match
                $db-&gt;insert( 'taskaudit', array(
                    'user'      =&gt; isset($_SESSION['user']), 
                    'action'    =&gt; $action,
                    'oldValue'  =&gt; $oValue,
                    'newValue'  =&gt; $nValue,
                    'table'     =&gt; $table,
                    'rowId'     =&gt; $id,
                    'column'    =&gt; $oKey,
                    'date'      =&gt; date('Y-m-d H:i:s')
                ));
            }
        }
    }
    if(array_key_exists('statusDefId', $newValues) &amp;&amp; $action == 'edit'){
        handleTaskStatusChange($oldValues, $newValues, $prevValues, $id);
    }
}
</code></pre>

<p>}</p>

<p>// Build our Editor instance and process the data coming from <em>POST<br />
    $editor = Editor::inst( $db, 'task', 'id');<br />
    $tableServerFieldApplicationId = 'tableServerFields'."</em>".$_SESSION['applicationPageId'];<br />
    if(isset($_SESSION[$tableServerFieldApplicationId])){<br />
        foreach($_SESSION[$tableServerFieldApplicationId] as $fieldRow){<br />
            $editor-&gt;fields(Field::inst($fieldRow));<br />
        }<br />
    }</p>

<pre><code>// Pre functions
// preEdit:  Pre-row update event - triggered before the row / page data is updated.
$editor-&gt;on( 'preEdit', function ( $editor, $id, $values){
    getPrevValues($editor-&gt;db(), $editor-&gt;table()[0], $id);
 });
$editor-&gt;on( 'preRemove', function ( $editor, $id, $values){
    getPrevValues($editor-&gt;db(), $editor-&gt;table()[0], $id);
 });
//Post functions
// postEdit:  Post-row edit event - triggered after the row / page has been updated.
$editor-&gt;on( 'postEdit', function ( $editor, $id, $values, $row ){
    logChange( $editor-&gt;db(), $editor-&gt;table()[0], 'edit', $id, $values );
 });
$editor-&gt;process( $_POST );
$editor-&gt;json();
</code></pre>

<p>// taskWorkflowHandler.php page:<br />
$connectPdoResults = connectPdo();</p>

<p>function handleTaskStatusChange($oldValue, $newValue, $taskData, $taskId){<br />
    global $connectPdoResults;<br />
    $errorCode = "";<br />
    $errMsg = "";</p>

<pre><code>// get taskWorkflow details
$taskWorkflowResult = getTaskWorkflow($connectPdoResults['pdo'], $taskData, $newValue['statusDefId']);
$twfRow = $taskWorkflowResult['data'];

if($taskWorkflowResult['errorCode']){
    $errorCode = $taskWorkflowResult['errorCode'];
    $errMsg .= $taskWorkflowResult['errMsg'];
}
// If createNewTask is 0
if($twfRow['createNewTask'] == 0){
    $updateTaskResult = updateTaskTable($connectPdoResults['pdo'], $twfRow, $taskId);
    if($updateTaskResult['errorCode']){
        $errorCode = $updateTaskResult['errorCode'];
        $errMsg .= $updateTaskResult['errMsg'];
    }
}
</code></pre>

<p>}</p>

<p>function updateTaskTable($pdo, $taskworkflowData, $taskId){<br />
    $taskArgs = [];<br />
    $errorCode = "";<br />
    $errMsg = "";</p>

<pre><code>$updateTaskSql = 'update prosystem_dev.task set taskDefId = ? ';
$taskArgs[] = $taskworkflowData['nextTaskDefId'];
if($taskworkflowData['nextStatusDefId']){
    $updateTaskSql .= ', statusDefId = ? ';
    $taskArgs[] = $taskworkflowData['nextStatusDefId'];
}
$updateTaskSql .= ' where id = ?';
$taskArgs[] = $taskId;
$updateTaskResult = executeSql($pdo, $updateTaskSql, $taskArgs);
if($updateTaskResult['errorCode']){
    $errorCode = $updateTaskResult['errorCode'];
    $errMsg = $updateTaskResult['errMsg'];
}
// return if errors exist
return ['errorCode'=&gt;$errorCode, 'errMsg'=&gt;$errMsg];
</code></pre>

<p>}</p>

&lt;?php
&gt;
```
?&gt;
]]>
        </description>
    </item>
    <item>
        <title>Datatable is having excessive top padding</title>
        <link>https://datatables.net/forums/discussion/69262/datatable-is-having-excessive-top-padding</link>
        <pubDate>Sun, 01 Aug 2021 14:10:07 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>UnfreeHex</dc:creator>
        <guid isPermaLink="false">69262@/forums/discussions</guid>
        <description><![CDATA[<p>I made a web application, with a database linked in it. I used the database to display the users that have registered in the webpage (not published, thus its all made up data). I used datatables.net for the design of my table, following this videos:</p>

<p><a rel="nofollow" href="https://youtu.be/s3o8iuoDMyI?list=LL">https://youtu.be/s3o8iuoDMyI?list=LL</a><br />
<a rel="nofollow" href="https://youtu.be/U0zYxZ6OzDM?list=LL">https://youtu.be/U0zYxZ6OzDM?list=LL</a></p>

<p>But I am not exactly getting the desired result in my display of my table.</p>

<p>Datatable now:<br />
<img src="https://datatables.net/forums/uploads/editor/zd/qa6nvewd0l2j.png" alt="" title="" /></p>

<p>I am not sure why it has too much padding both in the header part and the body part's top. I did exactly what the videos did but i am unsure why its not resulting in the perfect table.</p>

<p>my code:</p>

<pre><code>@{
    ViewData["Title"] = "Admin Page";
    string[] TableHeaders = new string[]
    {
      "First name"
      ,"Last name"
      ,"Email"
      ,"Phone Number"
    };
    Layout = "/Views/Shared/_Layout.cshtml";
}

&lt;style&gt;
    body {
        display: flex;
        background: #222831;
        align-items: center;
        justify-content: center;
        height: 100vh;
        color: snow;
        margin-bottom: 60px;
        font-family: Kalam, cursive;
    }
    .table{
        background:#fff;
        overflow-y:auto;
        box-shadow:0px 10px 50px 0px rgba(0,0,0,0.5);
        border-radius:10px;
        padding: 5rem;
    }
    table{
        width:100%;
        text-align:center;
        border-collapse:collapse;
    }
    table thead th,
    table tbody td{
        padding:15px;
        border:none;
        font-weight:600;
        font-size:14px;
    }
    table thead th{
        background: #1861ac;
        color:snow;
        font-size:16px;
        position:sticky;
        top:-1%;
    }
    table tbody td {
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    nav{
        display:none !important;
    }
&lt;/style&gt;

&lt;div class="table"&gt;
    &lt;table id="Users" class="table table-bordered table-hover table-sm"&gt;
        &lt;thead&gt;
            &lt;tr&gt;
                @{
                    foreach (var head in TableHeaders)
                    {
                        &lt;th&gt;
                            @head
                        &lt;/th&gt;
                    }
                }
            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
            @{
                if (Model != null)
                {
                    foreach (var Acc in Model)
                    {
                        &lt;tr&gt;
                            &lt;td&gt;@Acc.Fname&lt;/td&gt;
                            &lt;td&gt;@Acc.Lname&lt;/td&gt;
                            &lt;td&gt;@Acc.Email&lt;/td&gt;
                            &lt;td&gt;@Acc.PhoneNO&lt;/td&gt;
                        &lt;/tr&gt;
                    }

                }
            }

        &lt;/tbody&gt;
    &lt;/table&gt;
&lt;/div&gt;
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Need a working example of how to create an all-in-one parent/child editing view/form.</title>
        <link>https://datatables.net/forums/discussion/69211/need-a-working-example-of-how-to-create-an-all-in-one-parent-child-editing-view-form</link>
        <pubDate>Tue, 27 Jul 2021 18:27:39 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>koniahin</dc:creator>
        <guid isPermaLink="false">69211@/forums/discussions</guid>
        <description><![CDATA[<p>I have a number of forms that are inter-related in a parent/child method. As is I have them set up so that I visit the parent form, categories.php, for example then inline I add a render link in one of the columns that passes the id to the child and opens the child form (separate page).</p>

<p>It would be many times easier to visit the categories page, click/select a category row and load the child articles in a second table on the same page. Click to a different category and it loads its child articles. I found this post:</p>

<p><code>https://datatables.net/blog/2016-03-25</code></p>

<p>It meets the goal and I tried to create the forms using 2 tables articles and article_categories but found that the post is incomplete towards the ends and I could not glue it together.</p>

<p>The link to my demo: <a rel="nofollow" href="https://www.dottedi.xyz/bin/article-categories.php" title="https://www.dottedi.xyz/bin/article-categories.php"></a><a rel="nofollow" href="https://www.dottedi.xyz/bin/article-categories.php">https://www.dottedi.xyz/bin/article-categories.php</a></p>

<p>In the post there is a reference to the following code but it does not say where it gets added:</p>

<p><code>table.row( { selected: true } ).data();</code></p>

<p>When I got to this next item and added this code in the child table that would break the page article categories page from loading data. It sticks at "loading" but never loads:</p>

<pre><code>-&gt;join(
        Mjoin::inst( 'users' )
            -&gt;link( 'sites.id', 'users.site' )
            -&gt;fields(
                Field::inst( 'id' )
            )
    )
</code></pre>

<p>And yes, I updated the fields to the correct table names and field names. With that disabled I updated the server side php file adding the if/else code described here but replacing it with my table name/fields:</p>

<pre><code>if ( ! isset($_POST['site']) || ! is_numeric($_POST['site']) ) {
    echo json_encode( [ "data" =&gt; [] ] );
}
else {
    Editor::inst( $db, 'users' )
        -&gt;field(
            Field::inst( 'users.first_name' ),
            Field::inst( 'users.last_name' ),
            Field::inst( 'users.phone' ),
            Field::inst( 'users.site' )
                -&gt;options( 'sites', 'id', 'name' )
                -&gt;validator( 'Validate::dbValues' ),
            Field::inst( 'sites.name' )
        )
        -&gt;leftJoin( 'sites', 'sites.id', '=', 'users.site' )
        -&gt;where( 'site', $_POST['site'] )
        -&gt;process($_POST)
        -&gt;json();
}
</code></pre>

<p>That caused the page to break. I also don't see how/where you bring the child table onto the page. The general problem is that the solution is incomplete and doesn't provide adequate help regarding where some of the code parts belong.</p>

<p>I made .txt copies of my php files. To see them visit:</p>

<p><a rel="nofollow" href="https://www.dottedi.xyz/bin/dt/article-categories.php.txt">https://www.dottedi.xyz/bin/dt/article-categories.php.txt</a><br />
<a rel="nofollow" href="https://www.dottedi.xyz/bin/dt/articles.php.txt">https://www.dottedi.xyz/bin/dt/articles.php.txt</a></p>

<p>The php/controller files:</p>

<p><a rel="nofollow" href="https://www.dottedi.xyz/bin/controllers/article-categories.php.txt">https://www.dottedi.xyz/bin/controllers/article-categories.php.txt</a><br />
<a rel="nofollow" href="https://www.dottedi.xyz/bin/controllers/articles.php.txt">https://www.dottedi.xyz/bin/controllers/articles.php.txt</a></p>

<p>I could add the text directly into this post but it would get very long. If it helps say so.<br />
Thank you</p>
]]>
        </description>
    </item>
    <item>
        <title>Error after upgrading from Editor 1.9.2 to 1.9.6</title>
        <link>https://datatables.net/forums/discussion/68724/error-after-upgrading-from-editor-1-9-2-to-1-9-6</link>
        <pubDate>Wed, 16 Jun 2021 10:55:04 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>dynasoft</dc:creator>
        <guid isPermaLink="false">68724@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>: I get the following error, please advise</p>

<p>System.MissingMethodException<br />
  HResult=0x80131513<br />
  Message=Method not found: 'DataTables.Editor DataTables.Editor.Process(System.Web.HttpRequest)'.<br />
  Source=TBDotNet.Model</p>

<p>Bit of code is this:</p>

<pre><code>[System.Web.Http.Route("ABC/CRUDServABC")]
[System.Web.Http.HttpGet]
[System.Web.Http.HttpPost]
public ActionResult CRUDServABC(int intContTpe, long lngContIdx, int intItemTpe, long lngItemIdx, string strItemNme, int intRemoveABC)
{
    ABCUISettings lblo = new ABCUISettings();
    return Json(ABCModel.CRUDServABC(intContTpe, lngContIdx, intItemTpe, lngItemIdx, strItemNme, intRemoveABC, lblo), JsonRequestBehavior.AllowGet);
}
</code></pre>

<p>Thanks.</p>
]]>
        </description>
    </item>
    <item>
        <title>Using DTE Duplicate how do I auto-update some fields like Publish in the new $ID?</title>
        <link>https://datatables.net/forums/discussion/68950/using-dte-duplicate-how-do-i-auto-update-some-fields-like-publish-in-the-new-id</link>
        <pubDate>Sat, 03 Jul 2021 18:48:56 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>koniahin</dc:creator>
        <guid isPermaLink="false">68950@/forums/discussions</guid>
        <description><![CDATA[<p>Duplicate, in itself, work fine. However when I duplicate the field I need to:</p>

<pre><code>  {
    extend: "selected",
    text: 'Duplicate',
    action: function ( e, dt, node, config ) {
      // Start in edit mode, and then change to create
      editor
      .edit( table.rows( {selected: true} ).indexes(), {
        title: 'Duplicate record',
        buttons: 'Create from existing'
      } )
      .mode( 'create' );
    }
  },
</code></pre>

<p>1) Set publish to No<br />
2) With 2 date field I need to update them the first one to now and the second to 30 days ahead. This code gets those values:</p>

<p>$today = date('Y-m-d');<br />
$date_plus_30 = date('Y-m-d', strtotime("+30 days"));</p>

<p>If not using duplicate I do something like:</p>

<pre><code>  {
    label: 'Date begins (this must be updated)',
    name:  'date_begins',
    default: '&lt;?php echo $today; ?&gt;',
    attr: { placeholder: "Format: YYYY-MM-DD" },
  },

  {
    label: 'Date ends (this must be updated)',
    name:  'date_ends',
    default: '&lt;?php echo $date_plus_30; ?&gt;',
    attr: { placeholder: "Format: YYYY-MM-DD" },
  },
</code></pre>

<p>However with duplicate those values get overwritten.</p>
]]>
        </description>
    </item>
    <item>
        <title>Cannot set property 'id' of null in Datatable</title>
        <link>https://datatables.net/forums/discussion/69011/cannot-set-property-id-of-null-in-datatable</link>
        <pubDate>Fri, 09 Jul 2021 14:36:33 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>ANDREANQL</dc:creator>
        <guid isPermaLink="false">69011@/forums/discussions</guid>
        <description><![CDATA[<p>0</p>

<p>hello iam using datatable i get data from ajax and foreach data then add row to my datatable, but i always got error like this create:805 Uncaught TypeError: Cannot set property 'id' of null in line code "] ).node().id = obj.id;"</p>

<p>for my code</p>

<pre><code>    $.ajax({
                        url : "&lt;?php echo url('prod_bill_of_material/get-itemfg') ?&gt;",
                        method : "GET",
                        success : function(data){
                            console.log(data);
                            // var trHTML = '';
                            var no = 1 ;
                            table_modal_itemfg.clear().draw();
                            var field="itemfg";
                            $.each(data, function( index , obj){

                                    table_modal_itemfg.row.add( [
 '&lt;input type="hidden" readonly id="item_code_'+obj.id+'" value="'+obj.item_code+'"  class="form-control input-sm" data-toggle="tooltip" data-placement="top" title="'+obj.item_code+'"&gt;'+obj.item_code,
                                '&lt;input type="hidden" readonly id="item_name_'+obj.id+'" value="'+obj.item_name+'"  class="form-control input-sm" data-toggle="tooltip" data-placement="top" title="'+obj.item_name+'"&gt;'+obj.item_name,                            
                                '&lt;input type="hidden" readonly id="item_measur_'+obj.id+'" value="'+obj.item_measur+'"  class="form-control input-sm" data-toggle="tooltip" data-placement="top" title="'+obj.item_measur+'"&gt;'+obj.item_measur,                            
                                '&lt;input type="hidden" readonly id="item_weight_'+obj.id+'" value="'+obj.item_weight+'"  class="form-control input-sm" data-toggle="tooltip" data-placement="top" title="'+obj.item_weight+'"&gt;'+obj.item_weight,                            
                                '&lt;input type="hidden" readonly id="item_status_'+obj.id+'" value="'+obj.item_status+'"  class="form-control input-sm" data-toggle="tooltip" data-placement="top" title="'+obj.item_status+'"&gt;'+obj.item_status,      ~~~~
                                    ] ).node().id = obj.id;
                                table_modal_itemfg.draw(false);
                                no++;
                            });
                        }
                    });
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>localStorage</title>
        <link>https://datatables.net/forums/discussion/68995/localstorage</link>
        <pubDate>Thu, 08 Jul 2021 08:36:57 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>kuvvetiz</dc:creator>
        <guid isPermaLink="false">68995@/forums/discussions</guid>
        <description><![CDATA[<p>Hello to everyone,<br />
I wonder if there is no usage example of localstorage usage other than Editor ? Have a nice day.</p>
]]>
        </description>
    </item>
    <item>
        <title>.Net and Mysql connection string</title>
        <link>https://datatables.net/forums/discussion/68909/net-and-mysql-connection-string</link>
        <pubDate>Wed, 30 Jun 2021 18:17:10 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>dynasoft</dc:creator>
        <guid isPermaLink="false">68909@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>: Hi, can anyone point me to examples for the above as I can't find any. I keep getting error Unable to find the requested .Net Framework Data Provider. Many thanks.</p>
]]>
        </description>
    </item>
    <item>
        <title>Reinit Problem</title>
        <link>https://datatables.net/forums/discussion/68814/reinit-problem</link>
        <pubDate>Wed, 23 Jun 2021 06:01:12 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>joelly</dc:creator>
        <guid isPermaLink="false">68814@/forums/discussions</guid>
        <description><![CDATA[<p>"DataTables warning: table id=table1 - Cannot reinitialise DataTable. "</p>

<p>Hey everyone,</p>

<p>I have several datatable ( table1) in my components. And its give me Cannot reinitialise error. Im using a lot of API for my data.</p>

<p>I read the <a rel="nofollow" href="https://datatables.net/manual/tech-notes/3">https://datatables.net/manual/tech-notes/3</a></p>

<p>But i couldnt solve the how can i use a lot of same datatable in my one single page?</p>

<p>Thanks for your suggestions.</p>
]]>
        </description>
    </item>
    <item>
        <title>editor dependend with NULL option</title>
        <link>https://datatables.net/forums/discussion/68660/editor-dependend-with-null-option</link>
        <pubDate>Thu, 10 Jun 2021 18:39:31 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>koniahin</dc:creator>
        <guid isPermaLink="false">68660@/forums/discussions</guid>
        <description><![CDATA[<p>I got editor dependent working nicely with a list of country and region codes. I now realize that we don't always have the region name to select from the list. In that case we need to add a NULL or empty --select-- option as the first item in the select list. How do we do that?</p>

<pre><code>    $regions = $db
        -&gt;select( 'regions', ['regions.region_code as value', 'regions.region_name as label'], ['regions.country_code' =&gt; $_REQUEST['values']['roster.pob_country_code'], 'publish' =&gt; 'Yes'] )
        -&gt;fetchAll();

    echo json_encode( [
        'options' =&gt; [
            'roster.pob_region_code' =&gt; $regions
        ]
    ] );
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Passing Custom Parameters</title>
        <link>https://datatables.net/forums/discussion/68666/passing-custom-parameters</link>
        <pubDate>Fri, 11 Jun 2021 08:30:12 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>CMOFNL</dc:creator>
        <guid isPermaLink="false">68666@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I need to pass additional parameters from my view to the controller (asp.net mvc5) within the datatables ajax call. In the read-only version of datatables I do this with the data part as follows :</p>

<pre><code>  "data": function (data) {
                    data.StartDate = $('#reportStartDate').val();
                    data.EndDate = $('#reportEndDate').val();
                    data.DeviceId = $('#selectedDeviceId').val();
                data.__RequestVerificationToken = $('input[name=__RequestVerificationToken]').val();
  }
</code></pre>

<p>I could then access these values from Request.Form in the controller method</p>

<p>However in the Editor version this does not seem to work, i.e. the values are not available in Request.Form</p>

<p>Can someone please help me out with the correct way to do this in the Editor version ? Thanks.</p>
]]>
        </description>
    </item>
    <item>
        <title>Add expand feature to my angular datatable</title>
        <link>https://datatables.net/forums/discussion/68556/add-expand-feature-to-my-angular-datatable</link>
        <pubDate>Fri, 04 Jun 2021 08:39:41 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>imranmvs777</dc:creator>
        <guid isPermaLink="false">68556@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:</p>
]]>
        </description>
    </item>
    <item>
        <title>How do you make a ckeditorClassic (textarea field) read only.</title>
        <link>https://datatables.net/forums/discussion/64826/how-do-you-make-a-ckeditorclassic-textarea-field-read-only</link>
        <pubDate>Thu, 08 Oct 2020 00:37:40 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>rmeetin</dc:creator>
        <guid isPermaLink="false">64826@/forums/discussions</guid>
        <description><![CDATA[<p>I have an administration form for managing comments. To act on a comment the admin should first read the comment. In order to properly read it I have ckeditorClassic type enabled, otherwise it will be a challenge because of all the html markup.</p>

<p>The administrator should not be able to edit the comment, only approve/disapprove. Both 'readonly' and 'ckeditorClassic' share text type thus they are mutually incompatible.</p>

<p>In another thread I found attr and tried it:</p>

<pre><code>    {
      label: 'Comment',
      name: 'blog_comments.comment',
      type: 'textarea',
      type: 'ckeditorClassic',
      attr:{ disabled:true },
    },
</code></pre>

<p>Does attr not work in this instance or do I have the formatting wrong?</p>
]]>
        </description>
    </item>
    <item>
        <title>Cannot read property 'Editor' of undefined</title>
        <link>https://datatables.net/forums/discussion/67964/cannot-read-property-editor-of-undefined</link>
        <pubDate>Sun, 18 Apr 2021 00:56:35 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>alexisgarci11</dc:creator>
        <guid isPermaLink="false">67964@/forums/discussions</guid>
        <description><![CDATA[<p>Hi guys, im following this example but i always get js error.<br />
<a rel="nofollow" href="https://editor.datatables.net/examples/inline-editing/simple.html">https://editor.datatables.net/examples/inline-editing/simple.html</a><br />
I have download the Editor files and the files are new so i guess its not a license problem.<br />
this is my code:<br />
    ?php<br />
    $mysqli = new mysqli("127.0.0.1", "root", "", "vzsdgvsdb");<br />
    // Check connection<br />
    if ($mysqli-&gt;connect_errno) {<br />
    echo "Failed to connect to MySQL: " . $mysqli-&gt;connect_error;<br />
    exit();<br />
    }<br />
    // DataTables PHP library<br />
    include("lib/DataTables.php");<br />
    // Alias Editor classes so they are easy to use<br />
    use<br />
     DataTables\Editor,<br />
    DataTables\Editor\Field,<br />
     DataTables\Editor\Format,<br />
    DataTables\Editor\Mjoin,<br />
    DataTables\Editor\Options,<br />
    DataTables\Editor\Upload,<br />
       DataTables\Editor\Validate,<br />
     DataTables\Editor\ValidateOptions;</p>

<pre><code> // Build our Editor instance and process the data coming from _POST
 Editor::inst($db, 'datatables_demo')
 -&gt;fields(
Field::inst('first_name')
-&gt;validator(Validate::notEmpty(ValidateOptions::inst()
 -&gt;message('A first name is required')
 )),
 Field::inst('last_name')
 -&gt;validator(Validate::notEmpty(ValidateOptions::inst()
 -&gt;message('A last name is required')
)),
Field::inst('position'),
 Field::inst('email')
 -&gt;validator(Validate::email(ValidateOptions::inst()
 -&gt;message('Please enter an e-mail address')
)),
Field::inst('office'),
 Field::inst('extn'),
 Field::inst('age')
-&gt;validator(Validate::numeric())
-&gt;setFormatter(Format::ifEmpty(null)),
Field::inst('salary')
-&gt;validator(Validate::numeric())
-&gt;setFormatter(Format::ifEmpty(null)),
Field::inst('start_date')
 -&gt;validator(Validate::dateFormat('Y-m-d'))
-&gt;getFormatter(Format::dateSqlToFormat('Y-m-d'))
-&gt;setFormatter(Format::dateFormatToSql('Y-m-d'))
)
;?&gt;

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;

    &lt;link rel="stylesheet" href="jquery.dataTables.min.css"/&gt;
    &lt;link rel="stylesheet" href="buttons.dataTables.min.css"/&gt;
    &lt;link rel="stylesheet" href="select.dataTables.min.css"/&gt;
    &lt;link rel="stylesheet" href="dataTables.dateTime.min.css"/&gt;
    &lt;link rel="stylesheet" href="editor.dataTables.min.css"/&gt;

    &lt;script src="jquery-3.5.1.js"&gt;&lt;/script&gt;
    &lt;!--&lt;script src="jquery.dataTables.min.js"&gt;&lt;/script&gt;--&gt;
    &lt;script src="dataTables.buttons.min.js"&gt;&lt;/script&gt;
    &lt;script src="dataTables.select.min.js"&gt;&lt;/script&gt;
    &lt;script src="dataTables.dateTime.min.js"&gt;&lt;/script&gt;


&lt;/head&gt;
&lt;body class="nav-toggle"&gt;
&lt;table id="example" class="display" cellspacing="0" width="100%"&gt;
    &lt;thead&gt;
    &lt;tr&gt;
        &lt;th&gt;&lt;/th&gt;
        &lt;th&gt;First name&lt;/th&gt;
        &lt;th&gt;Last name&lt;/th&gt;
        &lt;th&gt;Position&lt;/th&gt;
        &lt;th&gt;Office&lt;/th&gt;
        &lt;th width="18%"&gt;Start date&lt;/th&gt;
        &lt;th&gt;Salary&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
&lt;/table&gt;

&lt;script&gt;
    var editor; // use a global for the submit and return data rendering in the examples
    $(document).ready(function() {
        editor = new $.fn.dataTable.Editor( {
            ajax: "staff.php",
            table: "#example",
            fields: [ {
                label: "First name:",
                name: "first_name"
            }, {
                label: "Last name:",
                name: "last_name"
            }, {
                label: "Position:",
                name: "position"
            }, {
                label: "Office:",
                name: "office"
            }, {
                label: "Extension:",
                name: "extn"
            }, {
                label: "Start date:",
                name: "start_date",
                type: "datetime"
            }, {
                label: "Salary:",
                name: "salary"
            }
            ]
        } );
        // Activate an inline edit on click of a table cell
        $('#example').on( 'click', 'tbody td:not(:first-child)', function (e) {
            editor.inline( this );
        } );
        $('#example').DataTable( {
            dom: "Bfrtip",
            ajax: "staff.php",
            order: [[ 1, 'asc' ]],
            columns: [
                {
                    data: null,
                    defaultContent: '',
                    className: 'select-checkbox',
                    orderable: false
                },
                { data: "first_name" },
                { data: "last_name" },
                { data: "position" },
                { data: "office" },
                { data: "start_date" },
                { data: "salary", render: $.fn.dataTable.render.number( ',', '.', 0, '$' ) }
            ],
            select: {
                style:    'os',
                selector: 'td:first-child'
            },
            buttons: [
                { extend: "create", editor: editor },
                { extend: "edit",   editor: editor },
                { extend: "remove", editor: editor }
            ]
        } );
    } );
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>So if i leave that line commented (the line that get the datatables.min.js) i get the following erros:</p>

<pre><code>    dataTables.buttons.min.js:6 Uncaught TypeError: Cannot read property 'ext' of undefined
        at dataTables.buttons.min.js:6
        at dataTables.buttons.min.js:5
        at dataTables.buttons.min.js:5

    ​ Uncaught TypeError: Cannot set property 'select' of undefined
        at dataTables.select.min.js:25
        at dataTables.select.min.js:15
        at dataTables.select.min.js:15

    jquery-3.5.1.js:4055 Uncaught TypeError: Cannot read property 'Editor' of undefined
        at HTMLDocument.&lt;anonymous&gt; ((index):52)
        at mightThrow (jquery-3.5.1.js:3762)
        at process (jquery-3.5.1.js:3830)`
     dataTables.buttons.min.js:6 Uncaught TypeError: Cannot read property 'ext' of undefined
        at dataTables.buttons.min.js:6
        at dataTables.buttons.min.js:5
        at dataTables.buttons.min.js:5
</code></pre>

<p>If i let it on i get:</p>

<pre><code>Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
    at HTMLDocument.&lt;anonymous&gt; ((index):43)
    at mightThrow (jquery-3.5.1.js:3762)
    at process (jquery-3.5.1.js:3830)
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Is there a callback for the $db-&gt;update() method?</title>
        <link>https://datatables.net/forums/discussion/67940/is-there-a-callback-for-the-db-update-method</link>
        <pubDate>Thu, 15 Apr 2021 19:50:09 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>TomBajzek</dc:creator>
        <guid isPermaLink="false">67940@/forums/discussions</guid>
        <description><![CDATA[<p>I have an application that uses the $db-&gt;update() method to update a field in a related table. Next, I need to read back that related table (using a PDO query, as there is no editor for that table in this file), to build a groups fie for HTTP AUTH. I find that when I read back the related table I've updated, the update has not yet happened in the related table. It looks like I need a callback for the $db-&gt;update() method. I could not find documentation indicating that such a callback exists. Am I missing something, or tell me how I can get a callback with the $db-&gt;update() has finished?</p>

<p>Thanks,<br />
Tom</p>
]]>
        </description>
    </item>
    <item>
        <title>PHP PDO CRUD.</title>
        <link>https://datatables.net/forums/discussion/67862/php-pdo-crud</link>
        <pubDate>Sat, 10 Apr 2021 04:58:10 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>jimomak</dc:creator>
        <guid isPermaLink="false">67862@/forums/discussions</guid>
        <description><![CDATA[<p>I am desperate. I need to perform AJAX jQuery CRUD using DataTables. I use PHP PDO MySQL. There is so much 'disinformation' on the web that I'm confused. Sorry...just being truthful. I know PHP PDO and use a single PHP connection no OOP functions. I follow PDO delusions methods for secure PHP PDO. I do not want to sacrifice security for simplicity...but simplicity is the issue. I can easily render the DataTable hooking it to PHP PDO, but I can't understand the 'success' syntax for rendering the table using AJAX jQuery, Inserting, updating, and deleting. What is being posted on the Web does not make sense, is too obtuse, and mixes up the various methods into an nFactorial of soup. Am I the only one who experiences this 'miasma'? I do not use a framework...just simple PHP PDO and my own CSS.This should not matter...DataTables and jQuery should be independant of frameworks. Thank you.</p>
]]>
        </description>
    </item>
    <item>
        <title>ReadOnly specific row in DataTable Editor</title>
        <link>https://datatables.net/forums/discussion/67818/readonly-specific-row-in-datatable-editor</link>
        <pubDate>Wed, 07 Apr 2021 06:05:58 +0000</pubDate>
        <category>DataTables 1.9</category>
        <dc:creator>lupearobert</dc:creator>
        <guid isPermaLink="false">67818@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I have a question regarding the datatables editor<br />
How can I make a row read only if a condition is met<br />
For example if one of the fields had value 3 I want the whole row to be readonly</p>
]]>
        </description>
    </item>
   </channel>
</rss>
