<?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>Priority support — DataTables forums</title>
        <link>https://next.datatables.net/forums/</link>
        <pubDate>Wed, 22 Jul 2026 01:33:16 +0000</pubDate>
        <language>en</language>
            <description>Priority support — DataTables forums</description>
    <language>en</language>
    <atom:link href="https://next.datatables.net/forums/categories/priority-support/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Can I add an if-construction while rendering?</title>
        <link>https://next.datatables.net/forums/discussion/81531/can-i-add-an-if-construction-while-rendering</link>
        <pubDate>Thu, 20 Nov 2025 14:46:34 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>arie0512</dc:creator>
        <guid isPermaLink="false">81531@/forums/discussions</guid>
        <description><![CDATA[<p>I see some options for adding an If construction while rendering, see <a rel="nofollow" href="https://datatables.net/manual/data/renderers">https://datatables.net/manual/data/renderers</a></p>

<p>But I can't figured it out how to add this one. I have now this render:</p>

<pre><code>columns: [                
    { data: null, render: (data) =&gt; data.client.gender + ' ' + data.client.firstname + ' ' + data.client.lastname
    }
]
</code></pre>

<p>If the records hold this data:<br />
Gender      Firstname      Lastname<br />
M               John              Doe</p>

<p>Than I would like to have in the column Mister John Doe.</p>

<p>How to add the if-contruction into the render?</p>

<p>I have try to add ... =&gt; if  (data.client.gender === 'M') { return Mister } but I get an error for using 'if'</p>

<p>Any idea how to achieve this?</p>

<p>Best regards,</p>

<p>Arie</p>
]]>
        </description>
    </item>
    <item>
        <title>How to get Node editor to not INSERT but still run UPDATE on left table?</title>
        <link>https://next.datatables.net/forums/discussion/80929/how-to-get-node-editor-to-not-insert-but-still-run-update-on-left-table</link>
        <pubDate>Fri, 16 May 2025 21:33:35 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">80929@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Version</strong>: "datatables.net-editor-server": "^2.0.8"</p>

<p><strong>Short problem description</strong>: My editor instance handles the initial create POST request well, but subsequent updates to the LEFT JOIN table are not executed in the DB.</p>

<p><strong>Full context below</strong></p>

<p>Hi, I have the following relevant field configs</p>

<pre><code>{
 "supply.inventory_id": {
    set: false,
  },
  "inventory.inventory_id": {
    set: false,
  },
  "inventory.prod_list_type": {
    formatter: (val, _) =&gt; trimStringSetEmptyToNull(val),
  },
  "inventory.inventory_shelf": {
    formatter: (val, _) =&gt; trimStringSetEmptyToNull(val),
  }
}
</code></pre>

<p>Here is the editor instance (shortened to only show relevant tables)</p>

<pre><code>const editor = new Editor(db, "supply", "upc")
.leftJoin("inventory", "supply.inventory_id", "=", "inventory.inventory_id");
</code></pre>

<p>I am handling the insertion into the inventory table with the postCreate event on the editor. I have to do this because otherwise there's no way to retrieve the inventory_id after creation and update the supply row with it.</p>

<p>Currently the create form works as expected. However, probably because the inventory_id fields are using "set: false" any updates to the <code>inventory.inventory_shelf</code> field have no effect. If I remove the <code>set: false</code> the updates will work, but the editor will try creating rows on the inventory table from create form submissions.</p>

<p>How can I fix this? I'd like to handle the left join table insertion logic myself while still having the ability to edit fields in the left joined table normally.</p>

<p><strong>Attempted solution</strong>:</p>

<p>I've tried using the set type option on one or both <code>inventory_id</code> fields to no avail</p>

<pre><code>  "inventory.inventory_id": {
    setType: Field.SetType.EDIT,
  },
</code></pre>

<p>when I enable this option, for some reason the editor tries to insert into the inventory table during the create event</p>
]]>
        </description>
    </item>
    <item>
        <title>How to view underlying SQL string for NodeJS editor?</title>
        <link>https://next.datatables.net/forums/discussion/78654/how-to-view-underlying-sql-string-for-nodejs-editor</link>
        <pubDate>Wed, 03 Apr 2024 18:42:12 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">78654@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I'm having a hard time finding how to view the entire SQL query string from the Editor instance in my NodeJS app. I'm wanting to see it for some DB performance info</p>

<pre><code>let editor = getEditorInstance(db, eventBody.columns, colConfig);

editor.debug(true);
</code></pre>

<p>For some reason, this code isn't outputting anything to the console on my server. Is this not the right way to do this?</p>
]]>
        </description>
    </item>
    <item>
        <title>How to access Field Options on frontend?</title>
        <link>https://next.datatables.net/forums/discussion/78456/how-to-access-field-options-on-frontend</link>
        <pubDate>Mon, 11 Mar 2024 18:50:26 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">78456@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I'm defining the following field options in my NodeJS server within an Mjoin.</p>

<pre><code>    .join(
      new Mjoin("media_types")
        .link("skus.yom_sku", "product_media_types.product_id")
        .link("media_types.id", "product_media_types.media_type_id")
        .order("name asc")
        .fields(
          new Field("id").options(
            new Options().table("media_types").value("id").label("name")
          ),

          new Field("name")
        )
    )
</code></pre>

<p>How can I access these options on the frontend to manually populate my own select element?</p>

<p>I'm aware datatables will do this automatically but I'm requiring a custom solution (using a view for displaying the column value) as mjoins don't support column searching.</p>

<p>Please let me know!</p>
]]>
        </description>
    </item>
    <item>
        <title>Mjoin hidden select field is sending null when other fields are edited</title>
        <link>https://next.datatables.net/forums/discussion/78461/mjoin-hidden-select-field-is-sending-null-when-other-fields-are-edited</link>
        <pubDate>Mon, 11 Mar 2024 22:04:35 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">78461@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I'm having a strange issue with a hidden Mjoin field called "media_types". When other fields in the row are edited the value is emptied.</p>

<p>The editor is sending a request with an empty array for the field:</p>

<pre><code>{"data":{"row_2815":{"product":{"title":"Chronicles Of Narnia DVD: Voyage The Dawn Treader","fba_latest_shipment_quantity_timestamp":null},"media_types":[],"media_types-many-count":0}},"action":"edit"}
</code></pre>

<p>Here is the column and editor field configuration</p>

<pre><code>{
    name: "media_types[].id",
    label:
      '&lt;Tooltip title = "The media types in this product (Vinyl, Book, CD, DVD, Bluray, 4K)" position = "bottom" trigger = "click"&gt;&lt;p&gt;Media Types&lt;/p&gt;&lt;/Tooltip&gt;',
    data: "media_types",
    excludeFromGeneralSearch: true,
    type: "select",
    multiple: true,
    visible: false, // using view column below for display
  },
</code></pre>

<p>Is there a way to resolve this issue? Please let me know if you need more information, I'm assuming I'm just missing a configuration option for the field. My <code>editor.inline.submit</code> is set to the default "changed" value.</p>
]]>
        </description>
    </item>
    <item>
        <title>Static backdrop</title>
        <link>https://next.datatables.net/forums/discussion/77395/static-backdrop</link>
        <pubDate>Thu, 19 Oct 2023 15:51:48 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>PF_Foraz</dc:creator>
        <guid isPermaLink="false">77395@/forums/discussions</guid>
        <description><![CDATA[<p>Hello,<br />
Is there an option to avoid closing the Editor Dialog when clicking outside?<br />
Thanks<br />
Pierre</p>
]]>
        </description>
    </item>
    <item>
        <title>How to server side ORDER BY with datatables.net-editor-server?</title>
        <link>https://next.datatables.net/forums/discussion/76974/how-to-server-side-order-by-with-datatables-net-editor-server</link>
        <pubDate>Thu, 17 Aug 2023 22:46:44 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">76974@/forums/discussions</guid>
        <description><![CDATA[<p>Hi there, I'm using the <code>datatables.net-editor-server</code> and am perplexed on how to add an order by clause to the Editor instance. It doesn't seem to be possible in the docs but I have a hard time thinking that wouldn't be a feature.</p>

<p>Is there a way to do this using the library, or some sort of work around? I'm not interested in a front end based solution- I'm building out a way to add custom sorts to certain columns for this use case and future use cases and would prefer to keep that logic on the server side.</p>

<p>I of course have access to the column being ordered and the order direction but I'm stuck on how to add my own custom ORDER BY clauses to the Editor</p>
]]>
        </description>
    </item>
    <item>
        <title>Negative search/filter capability?</title>
        <link>https://next.datatables.net/forums/discussion/76952/negative-search-filter-capability</link>
        <pubDate>Mon, 14 Aug 2023 12:52:55 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>lisarush</dc:creator>
        <guid isPermaLink="false">76952@/forums/discussions</guid>
        <description><![CDATA[<p>Is there a way to do a negative search within the <code>Filter</code> box at the top of a table?<br />
For example, with Gmail, you can enter <code>foo</code> to search for all emails that contain <code>foo</code>.  Or you can enter <code>-foo</code> to search for all emails that do NOT contain <code>foo</code>.  We do use the "smart search" capability, so we'd want to keep that (i.e. not using regular expressions).</p>

<p>This is something that I've wanted for a long time.  I've seen a couple posts somewhat related, but they talk about using <code>fnFilter</code> in the legacy version of dataTables.</p>
]]>
        </description>
    </item>
    <item>
        <title>Node JS Not Equals Where Condition Doesn't Work</title>
        <link>https://next.datatables.net/forums/discussion/74503/node-js-not-equals-where-condition-doesnt-work</link>
        <pubDate>Mon, 31 Oct 2022 22:02:15 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">74503@/forums/discussions</guid>
        <description><![CDATA[<p>Version:  "datatables.net-editor-server": "^2.0.10"</p>

<p>I've got a pretty basic where condition I'm trying to use.</p>

<pre><code>new Editor(db, "amazon_order", "id")
      .where("upc", "&lt;&gt;", null)
      .fields(...)
</code></pre>

<p>This isn't working. Doesn't matter which not equals operator I use ("!=" or "&lt;&gt;") or <a rel="nofollow" href="https://editor.datatables.net/manual/nodejs/conditions#Simple-usage" title="https://editor.datatables.net/manual/nodejs/conditions#Simple-usage">which variation of the where syntax I use</a></p>

<p>How can I add a where condition to filter out null UPCs?</p>
]]>
        </description>
    </item>
    <item>
        <title>How to modify a column search when displaying cents as dollars? (USD)</title>
        <link>https://next.datatables.net/forums/discussion/74409/how-to-modify-a-column-search-when-displaying-cents-as-dollars-usd</link>
        <pubDate>Wed, 19 Oct 2022 16:33:51 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">74409@/forums/discussions</guid>
        <description><![CDATA[<p>Hey there,</p>

<p>Recently our team has been storing currency in cents in our database. This means when our users are searching through some of our datatable columns, they have to use cents to find the value they want in a column even though it's displayed in dollars using the render function. This is pretty counter intuitive for users.</p>

<p>Is there a way to override a specific column's search value in the datatables API? If not it doesn't seem that hard to do manually but utilizing the API is always preferred first</p>
]]>
        </description>
    </item>
    <item>
        <title>Clearing column searches for all but one column</title>
        <link>https://next.datatables.net/forums/discussion/73820/clearing-column-searches-for-all-but-one-column</link>
        <pubDate>Fri, 26 Aug 2022 02:41:06 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">73820@/forums/discussions</guid>
        <description><![CDATA[<p>Hey there,</p>

<p>I'm trying to clear the search value for all columns except for one.</p>

<pre><code>// Clearing column searches in datatables API (Control)
dt.columns(function (idx, data, node) {
  const col = columns[idx];
  return col.data !== "column_name"; // Clear all but column_name
})
  .search("")
  .draw();
</code></pre>

<p>This doesn't appear to be working as expected. Any help is appreciated, thank you!</p>
]]>
        </description>
    </item>
    <item>
        <title>Datatable sort with image data not working (server-side).</title>
        <link>https://next.datatables.net/forums/discussion/73245/datatable-sort-with-image-data-not-working-server-side</link>
        <pubDate>Thu, 30 Jun 2022 15:44:26 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">73245@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Description of problem</strong>:<br />
The data has a image and a number associated with it. I want the column to be able to sort but its not happening. I tried some examples from the documentation it is not working. The data in the cell is in the form of <strong>"&lt;img src=' '&gt; number"</strong></p>

<p><strong>Screenshot of output</strong>:<br />
<img src="https://datatables.net/forums/uploads/editor/8t/11zufmadv9b0.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>How can I access the row inside the ajax url?</title>
        <link>https://next.datatables.net/forums/discussion/73125/how-can-i-access-the-row-inside-the-ajax-url</link>
        <pubDate>Sat, 18 Jun 2022 16:43:20 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>ak47</dc:creator>
        <guid isPermaLink="false">73125@/forums/discussions</guid>
        <description><![CDATA[<p>I'm trying to convert these calls to work against my rest API without an intermediary function on the server. So in order to construct a REST url for, say, an edit operation against a listing, I need to do a PUT request against:</p>

<p>/listings/12345</p>

<p>Where 12345 is the identifier for the listing, and I have that as DT_Rowid for the row that is being edited. What I don't know how to do is append that identifier to the url.</p>

<pre><code>  editor = new ($.fn.dataTable.Editor)(
    ajax: {
      url: "listings/" + ?
      method: 'PUT'
      data: (d) -&gt; {
        model_name: 'listings;
      }
      }
    table: '#listings_table'
    fields: [...

</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Checkbox events in editor popup modal</title>
        <link>https://next.datatables.net/forums/discussion/73026/checkbox-events-in-editor-popup-modal</link>
        <pubDate>Thu, 09 Jun 2022 13:58:03 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>PF_Foraz</dc:creator>
        <guid isPermaLink="false">73026@/forums/discussions</guid>
        <description><![CDATA[<p>Hello</p>

<p>I try to catch events of a checkbox in the popup modal of Editor (bootstrap). Using F12, I can see the id but the following is not working.<br />
$('#DTE_Field_Name_Enabled_0').on('click', function () {<br />
        alert('xx');<br />
});</p>

<p>The checkbox field is defined like this<br />
{<br />
                label: currentCulture == 'de-CH' ? "Actif" : "Active",<br />
                name: "Enabled",<br />
                type: "checkbox",<br />
                separator: "|",<br />
                options: [<br />
                    { label: '', value: 1 }<br />
                ],<br />
                unselectedValue: 0<br />
}</p>

<p>Could you please tell me what's wrong or how to catch this event?<br />
Thanks<br />
Pierre</p>
]]>
        </description>
    </item>
    <item>
        <title>How to dynamically disable a field (inline/edit form) based on value</title>
        <link>https://next.datatables.net/forums/discussion/73006/how-to-dynamically-disable-a-field-inline-edit-form-based-on-value</link>
        <pubDate>Tue, 07 Jun 2022 21:52:38 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">73006@/forums/discussions</guid>
        <description><![CDATA[<p>Hey there,</p>

<p>I have a requirement to disable editing a field depending on the value in it. (e.g; if the media type is an empty string, it is editable)</p>

<p>I attempted to use this disable function example from another post but it doesn't actually get called (perhaps it just alters behavior when disabling the field)</p>

<pre><code> {
    data: "media_type",
    disable: function (conf) {
      console.log("I was called"); // doesn't log when interacting with/loading field
      if (!isMediaTypeEditable($(conf._input)[0])) return;
      conf._enabled = false;
      $(conf._input).addClass("disabled");
    },
    title: 'Media Type'
  }
</code></pre>

<p>There is a pure javascript solution for checking the input and manually disabling/enabling easily but I like to use the datatables API where I can to keep stuff clean. Any ideas if this behavior is supported?</p>
]]>
        </description>
    </item>
    <item>
        <title>map_table.rows is not a function</title>
        <link>https://next.datatables.net/forums/discussion/72931/map-table-rows-is-not-a-function</link>
        <pubDate>Wed, 01 Jun 2022 08:31:33 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>ak47</dc:creator>
        <guid isPermaLink="false">72931@/forums/discussions</guid>
        <description><![CDATA[<pre><code>$("body").on 'click', "#map_button", -&gt;
    console.log $('[id$=listings_map_table]')
    map_table = $('[id$=listings_map_table]').DataTable
    console.log map_table
    map_table.rows().every -&gt;
</code></pre>

<p>The error is: Uncaught TypeError: map_table.rows is not a function</p>

<p>This is a page where the DataTable is created and drawn after the page is rendered based on user action. The table <em>looks</em> fine, and in my console I can see the object if I just spit the object to the console.</p>

<p>If I try to do an entire initialization, it tells me it can't reinitialize the table. But if I just do like the above, I get the ".rows is not a function" error.</p>

<p>What am I missing here?</p>
]]>
        </description>
    </item>
    <item>
        <title>How to pre-populate edit form with only some fields?</title>
        <link>https://next.datatables.net/forums/discussion/72629/how-to-pre-populate-edit-form-with-only-some-fields</link>
        <pubDate>Wed, 04 May 2022 20:57:31 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">72629@/forums/discussions</guid>
        <description><![CDATA[<p>Hey there,</p>

<p>Datatables has this handy example for <a rel="nofollow" href="https://editor.datatables.net/examples/api/duplicateButton.html" title="creating duplicate rows">creating duplicate rows</a>.</p>

<p>For my use case, I need almost this exact logic except I need some of the fields to be programmatically cleared/emptied in the form so the user can fill them with different data.</p>

<p>I've tried the following solution:</p>

<pre><code>const cleanDuplicateRow = (editor, dt) =&gt; {
  return editor
    .edit(dt.rows({ selected: true }).nodes(), false)
    .val(cleanedFields); // cleanedFields is an object of key:value pairs for fields:values
};

const cleanedRow = cleanDuplicateRow(editor, dt);

editor
  .edit(cleanedRow, {
    title: "Duplicate record",
    buttons: "Create from existing",
  })
  .mode("create");
</code></pre>

<p>But it appears that the .edit().val() chain doesn't return the type of object that editor.edit() is looking for- and it doesn't appear to return an object that I can call .indexes() or .nodes() on either. I'm sure the solution is pretty simple but I'm not familiar enough with datatables API to figure it out.</p>

<p>Let me know how I can accomplish this</p>
]]>
        </description>
    </item>
    <item>
        <title>Is there a way to have different values for pagingType when using multiple paging controls?</title>
        <link>https://next.datatables.net/forums/discussion/72605/is-there-a-way-to-have-different-values-for-pagingtype-when-using-multiple-paging-controls</link>
        <pubDate>Mon, 02 May 2022 18:19:58 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>mgalgs</dc:creator>
        <guid isPermaLink="false">72605@/forums/discussions</guid>
        <description><![CDATA[<p>I'm using multiple paging controls (<code>p</code>) on my DataTable (one above the table, one below). Is there a way to specify a different <a rel="nofollow" href="https://datatables.net/reference/option/pagingType">pagingType"&gt;<code>pagingType</code></a> for each set of controls? I'd like to use <code>simple</code> on the top and <code>full_numbers</code> on the bottom, since I have more space for the page numbers on the bottom.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to handle column data type in serverSide processing flow?</title>
        <link>https://next.datatables.net/forums/discussion/71987/how-to-handle-column-data-type-in-serverside-processing-flow</link>
        <pubDate>Wed, 09 Mar 2022 18:46:50 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">71987@/forums/discussions</guid>
        <description><![CDATA[<p>I have a column in my table that seems to flip from string to number when running an edit. If I edit a single row the column value gets sent to the server as a string, if I edit multiple rows the column value is sent as a number for each row.</p>

<p>I want to be able to make this more consistent and only send numbers because that's how it's stored in our database. I didn't have much luck with getFormatter or setFormatter. Here is an example of what I'm trying to do:</p>

<pre><code> new Field("some_table.numeric_column")
.getFormatter((val, _) =&gt; parseInt(val, 10))
.validator((val, data, _) =&gt; isColumnNumeric(data))
</code></pre>

<p>isColumnNumeric is wanting the column (that is inside of the row/data object) to be a number- not a string.</p>

<p>P.S: Try not to focus too much on the utility of the isColumnNumeric function, it's just an example of a validator that wants the column to be a number, it isn't our actual implementation</p>
]]>
        </description>
    </item>
    <item>
        <title>update table inculding foortCallback</title>
        <link>https://next.datatables.net/forums/discussion/71906/update-table-inculding-foortcallback</link>
        <pubDate>Thu, 03 Mar 2022 11:21:18 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">71906@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I am updating my table with $('#example').DataTable().ajax.reload(). This works for all rows, but not the footer that comes with a FooterCallback.</p>

<p>here is the code fo the table:</p>

<p>´´´<br />
    var editor_pos;<br />
    $(document).ready(function() {<br />
        editor_pos = new $.fn.dataTable.Editor( {<br />
            ajax: "../../../../../../DataTables/Editor/controllersKontura/positionen_St_INP_ofb.php",<br />
            table: "#liste_positionen",<br />
            fields: [<br />
                { label: "INP ID", name: "INP_ID", default: "<strong>INP_ID</strong>", type: "hidden", attr: {type: 'number'}},<br />
                { label: "Stapelname", name: "Stapelname", default: "<strong>Stapelname</strong>", type: "hidden"},<br />
                { label: "PosNummer - muss eindeutig sein", name: "SUB_ID", attr: {type: 'number'}},<br />
                { label: "Positiontext", name: "Positiontext"},<br />
                { label: "Konto", name: "POS_Konto",  type: 'select2', onFocus: 'focus',<br />
                    "opts": {"allowClear": true, "placeholder": "(nicht definiert)"},<br />
                    attr: {type: 'number'}},<br />
                { label: "Netto", name: "Nettoposition" , default: 0 },<br />
                { label: "Steuercode", name: "POS_Steuercode",  default: "2", type: 'select2', onFocus: 'focus',<br />
                    "opts": {"allowClear": true, "placeholder": "(nicht definiert)"},<br />
                    attr: {type: 'number'}},<br />
                { label: "Steuerbetrag", name: "Pos_MwSt_Betrag", default: 0 , attr: {type: 'number'}},<br />
                { label: "MWSt %", name: "MWSt",  type: "radio",  options: [ 0, 5, 10, 12, 13, 20], default: "20", attr: {type: 'number'}},<br />
            ],<br />
        } );<br />
        $('#liste_positionen').on('click', 'tbody td:not(:first-child, :last-child)', function() {<br />
            editor_pos.one('open', () =&gt; {<br />
                $('input', this).focus();<br />
            });<br />
            editor_pos.inline(table.cells(this.parentNode, '<em>').nodes(), {<br />
                submitTrigger: -1,<br />
                submitHtml: '&lt;i class="fa fa-save" style="font-size:24px;"/&gt;'<br />
            });<br />
        });<br />
        $('#liste_positionen').on( 'click', 'tbody td.row-new', function (e) {<br />
            editor_pos.inline( table.cells(this.parentNode, '</em>').nodes(), {<br />
                submitTrigger: -1,<br />
                submitHtml: '&lt;i class="fa fa-play"/&gt;'<br />
            } );<br />
        } );</p>

<pre><code>    var table = $('#liste_positionen').DataTable( {
        dom: "&lt;'toolbarpos'&gt;Bfrtip",
        ajax: {url: "../../../../../../DataTables/Editor/controllersKontura/positionen_St_INP_ofb.php",         type: 'POST'},
        fnInitComplete: function(){
            $('div.toolbarpos').html('&lt;div style="font-size: 14px; color: #365784; font-weight: bolder; padding-top: 10px;"&gt;Verbuchung Sachkonten:&lt;/div&gt;');
        },
        columns: [
            { data: null, defaultContent: '', className: 'select-checkbox', orderable: false},
            { data: "SUB_ID", "width": "20px", render: $.fn.dataTable.render.number('.', ',', 0, ''), className: 'dt-body-right'},
            { data: "pos_text2", editField: "Positiontext",  },
            { data: "kto_vorschlag", editField: "POS_Konto" },
            { data: "pos_netto1" , editField: "Nettoposition",  render: $.fn.dataTable.render.number( '.', ',', 2, '' ), className: 'dt-body-right'},
            { data: "steuercode_vorsch", editField: "POS_Steuercode"  },
            { data: "Pos_MwSt_Betrag_V", editField: "Pos_MwSt_Betrag",render: $.fn.dataTable.render.number( '.', ',', 2, '' ), className: 'dt-body-right'},
            { data: "Steuerproz_V", editField: "MWSt", render: $.fn.dataTable.render.number( '.', ',', 0, '' ), className: 'dt-body-right' },
            { data: "Brutto",render: $.fn.dataTable.render.number( '.', ',', 2, '' ), className: 'dt-body-right'},
        ],
        responsive: false,
                order: [ 1, 'asc' ],
        select: { style: 'os', selector: 'td:first-child' },
        "paging": false,
        "info": "",
        "searching": false,
        buttons: [
            { extend: 'selectedSingle',
                text: 'Kopieren',
                editor: editor_pos,
                formOptions: {
                    submitTrigger: -1,
                    submitHtml: '&lt;i class="fa fa-save" style="font-size:24px;"/&gt;' },
                action: function( e, dt, node, config ) {
                    $.fn.dataTable.ext.buttons.createInline.action.call(this, e, dt, node, config);
                    var row = table.row({selected: true}).data();
                    var rowlast = table.row( ':last-child' ).data();
                    var fields = editor_pos.displayed();
                    for (var i=0 ; i&lt;fields.length ; i++) {
                        editor_pos.field(fields[i]).val(row[fields[i]]);
                        editor_pos.field(fields[0]).val(rowlast[fields[0]]*1 + 1);
                    } } },
            { extend: 'create',
                text: 'Neu',
                editor: editor_pos,
                formOptions: {
                    submitTrigger: -1,
                    submitHtml: '&lt;i class="fa fa-save" style="font-size:24px;"/&gt;' },
                action: function( e, dt, node, config ) {
                    $.fn.dataTable.ext.buttons.createInline.action.call(this, e, dt, node, config);
                    var rowlast = table.row( ':last-child' ).data();
                    var fields = editor_pos.displayed();
                    for (var i=0 ; i&lt;fields.length ; i++) {
                        editor_pos.field(fields[0]).val(rowlast[fields[0]]*1 + 1);  } } },
            { extend: "edit",   editor: editor_pos },
            { extend: "remove", editor: editor_pos },
        ],
        "footerCallback": function ( row, data, start, end, display ) {
            var api = this.api(), data;

            // Remove the formatting to get integer data for summation
            var intVal = function ( i ) {
                return typeof i === 'string' ?
                        i.replace(/[\$,]/g, '')*1 :
                        typeof i === 'number' ?
                                i : 0;
            };

            // Total over all pages
            totalnet = api
                    .column( 4 )
                    .data()
                    .reduce( function (a, b) {
                        return intVal(a) + intVal(b);
                    }, 0 );
            // console.log("net:" +  __Netto_Calc__)
            totalnet = totalnet-(__Netto_Calc__);
            if (totalnet &lt;= '0.01' &amp;&amp; totalnet &gt;= '-0.01') {totalnet = '-';}

            totalbru = api
                    .column( 8 )
                    .data()
                    .reduce( function (a, b) {
                        return intVal(a) + intVal(b);
                    }, 0 );
            totalbru = totalbru-(__Brutto_Calc__);
            if (totalbru &lt;= '0.01' &amp;&amp; totalbru &gt;= '-0.01') {totalbru = '-'}

            // Update footer
            var numFormat = $.fn.dataTable.render.number( '.', ',', 2, '' ).display;
            $( api.column( 3 ).footer() ).html('Fehler:');
            $( api.column( 4 ).footer() ).html( numFormat (totalnet) ) ;
            $( api.column( 8 ).footer() ).html( numFormat (totalbru) );
        }
    } );
    editor_pos
            .on('submitSuccess', function () {
                ajax_call('__plugName__', 'erneuern');
            } );
    editor_pos
            .on('initEdit', function (e, node, data, items, type) {
                editor_pos.field('Nettoposition').val(data.pos_netto1);
                editor_pos.field('Pos_MwSt_Betrag').val(data.Pos_MwSt_Betrag_V);
                editor_pos.field('Positiontext').val(data.pos_text1);
                editor_pos.field('POS_Konto').val(data.kto_vorschlagNR);
                editor_pos.field('POS_Steuercode').val(data.steuercode_vorschNr);
                editor_pos.field('MWSt').val(data.Steuerproz_VNr);
            });

    editor_pos
            .dependent('POS_Steuercode', function(val, data, callback, e ) {
                if (val === '80') {
                    editor_pos.field('MWSt').set('0'); }
                if (val === '99') {
                    editor_pos.field('MWSt').set('0'); }
                callback(true);
            });

} );
$(document).on('focus', '.select2.select2-container', function (e) {
    // only open on original attempt - close focus event should not fire open
    if (e.originalEvent &amp;&amp; $(this).find(".select2-selection--single").length &gt; 0) {
        $(this).siblings('select').select2('open');
    }
});
</code></pre>

<p>´´´</p>
]]>
        </description>
    </item>
    <item>
        <title>How to edit rows from a filtered API instance</title>
        <link>https://next.datatables.net/forums/discussion/71537/how-to-edit-rows-from-a-filtered-api-instance</link>
        <pubDate>Sat, 05 Feb 2022 21:13:06 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>YOM</dc:creator>
        <guid isPermaLink="false">71537@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I have a requirement for users to be able to select multiple rows and click a button to modify a specific column for each selected row- but only if a particular condition is met within the row.</p>

<p>To do this I'm simply filtering the selected rows with a custom validation function. The filtering is working as filteredRows contains only the rows that should be edited.</p>

<p>Here's an example that shows the logic I'm using currently.</p>

<pre><code>setSelectedColumn(datatable, value) {
    const rowSelector = datatable.rows({ selected: true });
    const filteredRows = rowSelector.filter((row) =&gt;
      this.customValidationFunction(row)
    );

    editor.edit(filteredRows, false).val("status", value).submit();
  }
</code></pre>

<p>The problem is that filteredRows doesn't appear to be the correct type for editor.edit() to process it.</p>

<p>I've tried getting the nodes/indexes of the filteredRows from the filteredRows object, but when I do filteredRows.rows() it returns all the rows for the current page- <strong>not</strong> just the filtered rows. I'm unsure how to select only the filteredRows from the result set itself in such a way that I can get their indexes/nodes.</p>

<p><strong>How can I get the indexes/nodes from filteredRows so that editor.edit() can process it?</strong></p>
]]>
        </description>
    </item>
    <item>
        <title>using datatables in a popup - editors show only in the background and do not work</title>
        <link>https://next.datatables.net/forums/discussion/71331/using-datatables-in-a-popup-editors-show-only-in-the-background-and-do-not-work</link>
        <pubDate>Sat, 22 Jan 2022 19:04:46 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">71331@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I have a quite normal datatable, only it is sitting in a popup-window called with</p>

<pre><code>ajax_call('Core', 'XShowPopupNew', '__plugName__:__instance__', 'textvorlage')
</code></pre>

<p>Everything works fine, only I can not show any editors. Those appear kind of "inbetween the popup and the main site. If I close my popup, th editor then is in the foreground, but not working - I guess because I closed the site where it refers to.</p>

<p>I could solve most problems by using inline-editing, but for delete this can not work. Even if I use this code (that shouldnt display any editor as I believe)</p>

<pre><code>                {
                    extend: "selectedSingle",
                    text: "löschen",
                    action: function ( e, dt, node, config ) {
                        editor_posvorl
                                .edit( table.row( { selected: true } ).index(), false )
                                .set( 'geloescht', 1 )
                                .submit();
                    }
                },
</code></pre>

<p>nothing happens at all.<br />
Any ideas what do to?</p>

<p>Thanks Max</p>
]]>
        </description>
    </item>
    <item>
        <title>state save with filters - how to repopulate</title>
        <link>https://next.datatables.net/forums/discussion/71219/state-save-with-filters-how-to-repopulate</link>
        <pubDate>Wed, 12 Jan 2022 14:41:56 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>smoldovanskiy</dc:creator>
        <guid isPermaLink="false">71219@/forums/discussions</guid>
        <description><![CDATA[<p>When using state save and saving the search. How do you repopulate the dropdown when navigating back to the page with the grid?</p>
]]>
        </description>
    </item>
    <item>
        <title>where function does not work</title>
        <link>https://next.datatables.net/forums/discussion/70488/where-function-does-not-work</link>
        <pubDate>Wed, 03 Nov 2021 13:38:35 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">70488@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>using this controller:</p>

<pre><code>&lt;?php
include( "../lib/DataTables.php" );
use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\Validate,
    DataTables\Editor\ValidateOptions;

session_start();

$freig_person = $_SESSION["PID"];

// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'freigabe', 'ID_freigabe')
    -&gt;readTable('V_Rechnungern_mit_freig')
    -&gt;fields(
        Field::inst( 'V_Rechnungern_mit_freig.ID_freigabe' )-&gt;set(false),
        Field::inst( 'V_Rechnungern_mit_freig.Re_Empfaenger' ),
        Field::inst( 'V_Rechnungern_mit_freig.KUN_KundeBez' ),
        Field::inst( 'V_Rechnungern_mit_freig.INP_ID' ),
        Field::inst( 'V_Rechnungern_mit_freig.Stapelname' ),
        Field::inst( 'V_Rechnungern_mit_freig.freig_erledigt' )
            -&gt;setFormatter( function ( $val, $data, $opts ) {
                return ! $val ? 0 : 1;
            } ),
        Field::inst( 'V_Rechnungern_mit_freig.Lieferant' ),
        Field::inst( 'V_Rechnungern_mit_freig.LiefenantenNo' ),
        Field::inst( 'V_Rechnungern_mit_freig.Rechnungsdatum' ),
        Field::inst( 'V_Rechnungern_mit_freig.Rechnungsnummer' ),
        Field::inst( 'V_Rechnungern_mit_freig.fehlersuche' ),
        Field::inst( 'V_Rechnungern_mit_freig.Netto' ),
        Field::inst( 'V_Rechnungern_mit_freig.Brutto' ),
        Field::inst( 'V_Rechnungern_mit_freig.freig_angefordert_wann' )
            -&gt;getFormatter( Format::dateSqlToFormat( 'Y-m-d' ))
            -&gt;setFormatter( Format::dateFormatToSql('Y-m-d' )),
        Field::inst( 'V_Rechnungern_mit_freig.freig_angefordert_wie' ),
        Field::inst( 'V_Rechnungern_mit_freig.freig_erledigt_wann' ),
        Field::inst( 'V_Rechnungern_mit_freig.freig_abl_grund' ),
        Field::inst( 'V_Rechnungern_mit_freig.freig_zahlsperre' ),
        Field::inst( 'V_Rechnungern_mit_freig.freig_zahlsp_grund' )
    )

    -&gt;where( function ( $q, $freig_person ) {
        $q -&gt;where( 'V_Rechnungern_mit_freig.buha_ok', 1 )
            -&gt;where( 'V_Rechnungern_mit_freig.max', 10, '&lt;' )
            -&gt;where( 'V_Rechnungern_mit_freig.freig_erledigt', '0')
            -&gt;where( function($r, $freig_person) {
                $r -&gt;where( 'V_Rechnungern_mit_freig.freig_person', $freig_person )
                    -&gt;or_where( 'V_Rechnungern_mit_freig.freig_person2', $freig_person );
            });
    })


    -&gt;debug(true)
    -&gt;process( $_POST )
    -&gt;json();

</code></pre>

<p>I get an error as result. aim would be to have a sql where like</p>

<pre><code>"V_Rechnungern_mit_freig.buha_ok = 1 
AND  V_Rechnungern_mit_freig.max &lt; 10 
AND V_Rechnungern_mit_freig.freig_erledigt = 0 
AND (V_Rechnungern_mit_freig.freig_person = 3 OR V_Rechnungern_mit_freig.freig_person2 = 3)   
</code></pre>

<p>(assuming $freig_person is 3)</p>

<p>Do you see an error?</p>

<p>Thanks<br />
Max</p>
]]>
        </description>
    </item>
    <item>
        <title>No parameter return to the server</title>
        <link>https://next.datatables.net/forums/discussion/70480/no-parameter-return-to-the-server</link>
        <pubDate>Tue, 02 Nov 2021 13:58:47 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>Gilles Bouchard</dc:creator>
        <guid isPermaLink="false">70480@/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 />
draw, start and length are empty on the server side:<br />
The ajax call works but no parameters are transferred to the server.<br />
I put a breakpoint in the data section of the datatable and the data object is empty.<br />
This is the table code and where I put a breakpoint:</p>

<pre><code>table = $('#GridClesApi').DataTable({
       // responsive: true,
        stateSave:true,
        processing: true,
        serverside: true,
        paging: true,
        dom: 'Bfrtip',
        searching: { regex: true },
        ajax: {
            url: "/api/clesapi/chargegrilleCles",
            type: "POST",
            contentType: "application/json",
            dataType: "json",
            data: function (d) {
                return JSON.stringify(d);  &lt;====== d is empty here
            }
        },
        columnDefs: [{
            targets: [0],
            visible: false,
            searchable: false

        }],
        columns: [
            {
                name: "Id",
                data: "Id",
                width: "5%"
            },
            {
                data: "Cle",
                width: "10%"
            },
            {
                data: "Client",
                width: "25%"
            },
            {
                data: "Action",
                width: "15%"
            },
            {
                //Bouton d'actions
                data: null,
                className: "grid-action-buttons",
                width: "15%",
                render: function (data, type, row) {

                    let buttonModified = `&lt;li title="${LBLModify}" onclick="onClickModifyCleAPIFromGrid('${data.Id}')" class="btn btn-warning btn-customize-hq fas fa-pencil-alt"­&gt;&lt;/li&gt;`;
                    let buttonDelete = `&lt;li title="${LBLDelete}" onclick="onClickDeleteCleAPIFromGrid('${data.Id}')" class="btn btn-danger btn-customize-hq far fa-times" &gt;&lt;/li&gt;`;

                    return `&lt;div class="grid-column-crud-button-section"&gt;&lt;ul class="crud-ul-section"&gt;${buttonModified}${buttonDelete}&lt;/ul&gt;&lt;/div&gt;`;
                },
                orderable: false
            }
        ],
        //order: [[5, "desc"]],
       // language: commonLib.getLanguagePropertyDataTableNet(null, null)
    });
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>inline button for new row</title>
        <link>https://next.datatables.net/forums/discussion/70144/inline-button-for-new-row</link>
        <pubDate>Wed, 06 Oct 2021 17:09:18 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">70144@/forums/discussions</guid>
        <description><![CDATA[<p>I have a button inlne in each row calling this function:</p>

<pre><code>        $('#chat').on('click', 'td.editor-edit', function (e, dt, node, config) {
            e.preventDefault();
            var rowlast = table.row( ':last-child' ).data();
            editor_chat2
                .create( )
                .title ('Antworten')
                .buttons ('senden')
                .set( 'chat_antwortauf', rowlast[fields[1].value])
            } );
</code></pre>

<p>Problem is to get a value into "chat_antwortauf" from the row where the function is called from.</p>

<p>Thanks<br />
Max</p>
]]>
        </description>
    </item>
    <item>
        <title>user defined button</title>
        <link>https://next.datatables.net/forums/discussion/69710/user-defined-button</link>
        <pubDate>Mon, 06 Sep 2021 20:51:02 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">69710@/forums/discussions</guid>
        <description><![CDATA[<p>I try to figure out how to create a button like this:</p>

<pre><code>buttons: [
       { extend: 'selectedSingle',
         text: 'Kopieren',
             editor: editor,
         action: function ( data ) {
             ajax_call('__plugName__', 'kopieren', data.AR_Header.Re_Nummer_intern); }},
    ```
        
the column
</code></pre>

<pre><code>{data: "AR_Header.Re_Nummer_intern"}, //4
</code></pre>

<p>```</p>

<p>does exist and works - but in the function I try to call there is no value showing. I also tried data.column(4) and other things, none worked....</p>

<p>Thanks<br />
Max</p>
]]>
        </description>
    </item>
    <item>
        <title>copy tables and change selected values</title>
        <link>https://next.datatables.net/forums/discussion/69576/copy-tables-and-change-selected-values</link>
        <pubDate>Fri, 27 Aug 2021 12:36:30 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">69576@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>there are quite a lot of threats how to copy rows from one table to another. I also need this, but:<br />
* when copying change some values (especially for keeping track of what was copied)<br />
* there is the header-table and also the items-table; when copying a line in the header-table, I would also want the items (same ID plus item-ID) to be copied</p>

<p>Is that possible and reasonable to do in datatable, or should I better build a function for that in php?</p>

<p>Thanks Max</p>
]]>
        </description>
    </item>
    <item>
        <title>layout question</title>
        <link>https://next.datatables.net/forums/discussion/69361/layout-question</link>
        <pubDate>Tue, 10 Aug 2021 15:14:02 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>MadMax76</dc:creator>
        <guid isPermaLink="false">69361@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I am currently having the problem, that the option buttons are not inline with the text.</p>

<p>E.G.<br />
<img src="https://datatables.net/forums/uploads/editor/gx/5bx79c4jfo42.png" alt="" title="" /><br />
or here the buttuns are not beneath each other:<br />
<img src="https://datatables.net/forums/uploads/editor/7w/dvgrrr18ayez.png" alt="" title="" /></p>

<p>how can I change this behavior?<br />
Thanks<br />
Max</p>
]]>
        </description>
    </item>
    <item>
        <title>Displaying 'No data available in table'  and when clicking filters, table clears data.</title>
        <link>https://next.datatables.net/forums/discussion/69177/displaying-no-data-available-in-table-and-when-clicking-filters-table-clears-data</link>
        <pubDate>Fri, 23 Jul 2021 19:36:27 +0000</pubDate>
        <category>Priority support</category>
        <dc:creator>geebeetoo</dc:creator>
        <guid isPermaLink="false">69177@/forums/discussions</guid>
        <description><![CDATA[<p>I have a table created from a getJSON function that takes my data from a temporary file until I get my API call running.<br />
The table gets populated but the first row says No data available in table, when there is data in. I figure it was a problem with asynchronous functions running. But I am having trouble finding a fix with the way I am looping through my data to correctly display it into the table.</p>

<p>Here is all of my code.</p>

<p>$(document).ready(function() {</p>

<pre><code>$.getJSON("projects.json", function(results){
    var table = $('#results_table').DataTable();
    $('#results_table_wrapper').addClass('container mt-5');
        for(let project in results){
            let project_name = results[project].projectname;
            let project_owner = results[project].owner;
            $("#table_body").append("&lt;tr&gt;&lt;td&gt;"+project_name+"&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
            $("#table_body").append("&lt;tr&gt;&lt;td&gt;Released by "+project_owner+"&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
            let resources = results[project].resources;
            for(let resource in resources){
                let resource_name = resources[resource].resourcename;
                $("#table_body").append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;"+resource_name+"&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
                let versions = results[project].resources[resource].versions;
                for(let version in versions){
                    let version_decimal = versions[version].version;
                    let date = versions[version].date;
                    let user = versions[version].user;
                    let annotation = versions[version].annotation;
                    annotation = !annotation ? ' '  :
                    date = !date ? ' ' :
                    $("#table_body").append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;"+version_decimal+"&lt;/td&gt;&lt;td&gt;"+date+"&lt;/td&gt;&lt;td&gt;"+user+"&lt;/td&gt;&lt;td&gt;"+annotation+"&lt;/td&gt;&lt;/tr&gt;");
                }
            }
        }
});
</code></pre>

<p>});</p>
]]>
        </description>
    </item>
   </channel>
</rss>
