<?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>Select — DataTables forums</title>
        <link>https://next.datatables.net/forums/</link>
        <pubDate>Wed, 22 Jul 2026 01:33:24 +0000</pubDate>
        <language>en</language>
            <description>Select — DataTables forums</description>
    <language>en</language>
    <atom:link href="https://next.datatables.net/forums/categories/select/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Checkbox disapears when using version 3.1.1+ of select with bootstrap5</title>
        <link>https://next.datatables.net/forums/discussion/81796/checkbox-disapears-when-using-version-3-1-1-of-select-with-bootstrap5</link>
        <pubDate>Sat, 30 May 2026 08:23:33 +0000</pubDate>
        <category>Select</category>
        <dc:creator>BjornHa</dc:creator>
        <guid isPermaLink="false">81796@/forums/discussions</guid>
        <description><![CDATA[<p>Upgraded select from 3.1.0 to 3.1.3 using bootstrap5 and</p>

<pre><code>    columnDefs: [
      {
        targets: 0,
        className: 'select-checkbox'
      }
    ],
</code></pre>

<p>stopped working.<br />
It seems that it happened in version 3.1.1.</p>

<p>Checkbox works with DataTables styling.</p>

<p>Test case:<br />
<a rel="nofollow" href="https://live.datatables.net/moyefodo/1/edit">https://live.datatables.net/moyefodo/1/edit</a></p>

<p>KR,<br />
Björn H</p>
]]>
        </description>
    </item>
    <item>
        <title>override select highlight color</title>
        <link>https://next.datatables.net/forums/discussion/81747/override-select-highlight-color</link>
        <pubDate>Wed, 15 Apr 2026 12:58:42 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Mwhite007</dc:creator>
        <guid isPermaLink="false">81747@/forums/discussions</guid>
        <description><![CDATA[<p><img src="https://datatables.net/forums/uploads/editor/rm/xiyqqer0o1s2.png" alt="" title="" /><br />
currently i'm using jQuery 4.0.0, Bootstrap 5.3.x, dataTables 2.3.7 (with select and keytable extensions). i am getting a bright blue highlight on selected rows which doesn't match my color scheme. i'm using variables for the color scheme to i can re-skin easily but i can't seem to find the correct css selector. i've tried box-shadow and outline-color and every level of css using inspect but can't seem to change that blue. i have the same issue with the keytable cell with focus.<br />
the table tag looks like this:</p>

<pre><code>&lt;table id="dt_system" class="table table-hover headingTable" width="100%"&gt;
</code></pre>

<p>the css color variables look like this:</p>

<pre><code>/* Define Global Variables to be used throughout the sheet */
:root {
  --FontFamily: Aptos, "Trebuchet MS", Tahoma, Calibri, Roboto, Helvetica;
  --SmallFontFamily: "Aptos Narrow", Tahoma, Calibri, "Roboto Condensed", Helvetica;
  --LineHeightCompact: 1.1;
  --MenuBG: #525357;  /* Typically same as ParamBG */
  --MenuFontColor: #E5E2DA; /* Typically same as ParamFontColor */
  --MenuFontSize: 8pt; /* Typically same as SubDataFontSize */
  --SubMenu1BG: #3A3A3D; /* Typically 10% darker/lighter ParamBG */
  --SubMenu1FontColor: #E5E2DA; /* Typically same as ParamFontColor */
  --SubMenu2BG: #222224; /* Typically 20% darker/lighter ParamBG */
  --SubMenu2FontColor: #E5E2DA; /* Typically same as ParamFontColor */
  --ParamBG: #525357;
  --ParamFontColor: #E5E2DA;
  --ParamInputBG: #DEE1D6; /* Typically same as ParamFontColor */
  --ParamInputFontColor: #171A18; /* Typically same as ParamBG */
  --ParamFontSize: 12pt;
  --HeadBG: #394E60; 
  --HeadFontColor: #E5E2DA;
  --HeadFontSize: 18pt;
  --SubHeadBG: #635554;
  --SubHeadFontColor: #E0E5CF;
  --SubHeadInputBG: #F0F8FF; /* Typically same as SubHeadFontColor */
  --SubHeadInputFontColor: #191970; /* Typically same as SubHeadBG */
  --SubHeadFontSize: 12pt;
  --DataBG: #848973;
  --DataBGHover: #ACB396; /* to highlight selected row */
  --DataFontColor: #171A18;
  --DataFontSize: 10pt;
  --DataLinkHover: #C7CCB8; /* Typically same as SubDataBG */
  --SubDataBG: #C7CCB8;
  --SubDataFontColor: #171A18;
  --SubDataFontSize: 8pt;
  --subDataLinkHover: #635554; /* Typically same as SubNeadBG */
  --DataSelectedOutline: #C7CCB8; /* Typically same as SubDataBG */
  --dt-row-selected: #C7CCB8; /* Typically same as SubDataBG */
}
</code></pre>

<p>the current css attempt looks like this but i tried so many combinations without success</p>

<pre><code>/* Selected Row Background */
table.dataTable tbody &gt; tr.selected td {
  box-shadow: var(--DataSelectedOutline) !important;
  background-color: var(--DataBG) !important;
  color: var(--DataFontColor) !important;
}

/* Selected Cell Background, outline, fontColor */
table.table tr.data td.focus {
  box-shadow: var(--DataSelectedOutline) !important;
  outline-color: var(--DataSelectedOutline) !important;
  background-color: var(--DataBG) !important;
  color: var(--DataFontColor) !important;
}

</code></pre>

<p>the javascript has this for the keys and select options</p>

<pre><code>keys: {
      editor: systemEditor,
      blurable: true,
      columns: '.editable'
},

select: {
     selector: 'td:first-child',
     blurable: true,
     style:    'os',
     headerCheckbox: false
},

</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>How to copy / export, ... all lines in DataTables</title>
        <link>https://next.datatables.net/forums/discussion/81466/how-to-copy-export-all-lines-in-datatables</link>
        <pubDate>Wed, 22 Oct 2025 13:01:19 +0000</pubDate>
        <category>Select</category>
        <dc:creator>slolo</dc:creator>
        <guid isPermaLink="false">81466@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="https://live.datatables.net/patumuhi/1/edit">https://live.datatables.net/patumuhi/1/edit</a><br />
<strong>Debugger code (debug.datatables.net)</strong>: NA<br />
<strong>Error messages shown</strong>: NA<br />
<strong>Description of problem</strong>: Hello,</p>

<p>It is probably a stupid question but I am not able to do the following things below:<br />
1./ How to copy, export, ... all lines from a DataTable if no lines are selected (even if I see 10 lines on 50)</p>

<p>Yet in this example it works just fine without doing anything special:<br />
<a rel="nofollow" href="https://datatables.net/extensions/buttons/examples/html5/simple.html" title="https://datatables.net/extensions/buttons/examples/html5/simple.html"></a><a rel="nofollow" href="https://datatables.net/extensions/buttons/examples/html5/simple.html">https://datatables.net/extensions/buttons/examples/html5/simple.html</a></p>

<p>2./ How to avoid to select a line when clicking on the button "Action" (see DataTable without checkbox)</p>

<p>Othewise, if you select all lines (with checkbox in header) and unselect all, there is a small issue in html (see screenshot)</p>

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

<p>can you confirm this behavior.</p>

<p>thanks in advance for your help and have a nice day.</p>
]]>
        </description>
    </item>
    <item>
        <title>Link color for select</title>
        <link>https://next.datatables.net/forums/discussion/81169/link-color-for-select</link>
        <pubDate>Sat, 19 Jul 2025 11:20:50 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">81169@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<a rel="nofollow" href="https://live.datatables.net/mobotutu/1/edit">https://live.datatables.net/mobotutu/1/edit</a></p>

<p><strong>Description of problem</strong>:</p>

<p>When a table has links and are selected, the following CSS rule is applied causing the link to be too dark (at least in my opinion):</p>

<pre><code>table.dataTable &gt; tbody &gt; tr.selected a {
    color: rgb(9, 10, 11);
    color: rgb(var(--dt-row-selected-link));
}
</code></pre>

<p>There might be a reason for this, but I always find myself overwriting it with the standard selected CSS to show the link as white:</p>

<pre><code>/* Make links white when selected */
table.table.dataTable&gt;tbody&gt;tr.selected a {
    box-shadow: inset 0 0 0 9999px rgb(13, 110, 253);
    box-shadow: inset 0 0 0 9999px rgb(var(--dt-row-selected));
    color: rgb(255, 255, 255);
    color: rgb(var(--dt-row-selected-text));
}
</code></pre>

<p>I would vote to just use the normal CSS to make the link white and let a user modify it for the cases where they want a different color.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to Deselect removed rows after Serverside CRUD operation</title>
        <link>https://next.datatables.net/forums/discussion/69310/how-to-deselect-removed-rows-after-serverside-crud-operation</link>
        <pubDate>Wed, 04 Aug 2021 21:13:38 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Central145</dc:creator>
        <guid isPermaLink="false">69310@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:  I don't have a link, this isn't on the web.</p>

<p><strong>Debugger code (debug.datatables.net)</strong>:  <a rel="nofollow" href="https://debug.datatables.net/ufixot">https://debug.datatables.net/ufixot</a></p>

<p><strong>Error messages shown</strong>:  No Error Messages.</p>

<p><strong>Description of problem</strong>:<br />
I'm using the "Select" extension in combination with "Editor" and utilizing server side processing for CRUD operations. When I select a row(s) and edit them, they often come off the list due to a change in it's data after the .draw() event. This is expected and desired, but the selected rows (positionally, not in terms of data) remain selected. So in effect, whatever new rows replaced the position of the rows I edited, are now selected instead.</p>

<p>My approach was to hook into the "XHR.DT" or "DRAW" events and utilize the API to deselect the rows. However it seems there is a race condition of some sort, because nothing appears to happen. But if I wrap the .deselect() statement in a SETTIMEOUT for 5000ms, the rows are deselected as expected.</p>

<p>So, my question is this: Is there an option which deselects rows in this type of scenario? If there isn't, which event should I hook into in order for my call to the .deselect() function to have its effect?</p>
]]>
        </description>
    </item>
    <item>
        <title>The delete row button only works after editing, not on first load</title>
        <link>https://next.datatables.net/forums/discussion/80019/the-delete-row-button-only-works-after-editing-not-on-first-load</link>
        <pubDate>Tue, 08 Oct 2024 16:20:05 +0000</pubDate>
        <category>Select</category>
        <dc:creator>JammyClarkie</dc:creator>
        <guid isPermaLink="false">80019@/forums/discussions</guid>
        <description><![CDATA[<p>There are no error messages on screen or on console.<br />
When the datatable is loaded, if I select a row, then click on the delete button, the delete form shows.  If I then click on the delete button within the delete form, nothing happens.</p>

<p>If I were to click the edit button first, close the edit form and then repeat the above, the delete button will then work as expected.</p>

<p>// data-tables-productsection.js<br />
    // set in base.html.twig<br />
    let sectionId = typeof entityId === "undefined" || !entityId ? {} : entityId;</p>

<pre><code>var productEditor = new $.fn.dataTable.Editor({
    ajax: '/ajax/product-section-products/' + sectionId,
    fields: [
        {
            label: 'Ref:',
            name: 'ref'
        },
        {
            label: 'Name',
            name: 'name'
        }
    ]
})

var editor = new $.fn.dataTable.Editor( {
    ajax: '/ajax/product-section/' + sectionId,
    table: '#productsection-datatable',
    fields: [
        {
            label: "Rank:",
            name: "product_section.rank",
            fieldInfo: 'Enter an existing rank only.  It will become that rank and increase or decrease the ones inbetwen to make room.  Alternatively drag and drop.',
            attr: {
                type: 'number',
                min: 1,
                max: 999,
                step: 1
            }
        },
        {
            label: "Product:",
            name: "product_section.product_id",
            type: "datatable",
            editor: productEditor,
            optionsPair: { // needed to pre-select the product id
                value: "id"
            },
            config: {
                ajax: '/ajax/product-section-products/' + sectionId,
                columns: [
                    {
                        title: 'Ref:',
                        data: 'ref'
                    },
                    {
                        title: 'Name',
                        data: 'name'
                    }
                ]
            }
        },
        {
            label: "",
            name: "product_section.section_id",
            attr: {
                type: 'number',
                style: 'display:none;'
            },
            def: function() {
                return sectionId;
            }
        }
    ]
} );

// this event isn't triggered, but would be good for validating server side.
// editor.on('validatedCreate', function() {
//  console.log('here');
// });

editor
</code></pre>

<p>.on( 'postCreate postRemove postEdit', function () {<br />
    // After create or edit, a number of other rows might have been effected -<br />
    // so we need to reload the table, keeping the paging in the current position<br />
    table.ajax.reload( null, false );<br />
} );</p>

<p>var table = $('#productsection-datatable').DataTable({<br />
    dom: 'Bfrtip',<br />
    ajax: '/ajax/product-section/' + sectionId,<br />
    paging: false,<br />
    rowReorder: {<br />
        dataSrc: 'product_section.rank',<br />
        editor:  editor,<br />
        selector: 'td:first-child'<br />
    },<br />
    columns: [<br />
        {<br />
            data: null,<br />
            className: "dt-center w-5 reorder",<br />
            defaultContent: '&lt;i class="dripicons-menu"&gt;&lt;/i&gt;',<br />
            orderable: false<br />
        },<br />
        {<br />
            data: "product_section.rank",<br />
            className: "dt-center w-5",<br />
            orderable: true<br />
        },<br />
        {<br />
            data: "product.ref",<br />
            className: "",<br />
            orderable: false<br />
        },<br />
        {<br />
            data: "product.name",<br />
            className: "",<br />
            orderable: false<br />
        }<br />
    ],<br />
    columnDefs: [</p>

<pre><code>],
keys: true,
info: true,
select: true,
order: [[1, 'asc']],
buttons: [
    { extend: 'create', editor: editor, text: 'Add' },
    { extend: 'edit',   editor: editor },
    { extend: 'remove', editor: editor }
],
</code></pre>

<p>});</p>

<p>// DataTablesAjaxController.php</p>

<pre><code>#[Route('/ajax/product-section/{section}')]
#[IsGranted('IS_AUTHENTICATED_REMEMBERED')]
public function productSection(Section $section, EntityManagerInterface $em, Request $request): Response
{
    $sectionId = $section-&gt;getId();
    $db = new Database(array(
        "type" =&gt; "Mysql",
        "pdo" =&gt; $em-&gt;getConnection()-&gt;getNativeConnection()
    ));

    $json =
        Editor::inst($db, 'product_section')
            -&gt;fields(
                Field::inst('product_section.rank')
                    -&gt;validator(Validate::notEmpty()),
                Field::inst('product_section.id'),
                Field::inst('product_section.product_id')
                    -&gt;validator(Validate::notEmpty()),
                Field::inst('product_section.section_id'),
                Field::inst('product.ref'),
                Field::inst('product.name'),
                Field::inst('product.rank'),
                Field::inst('product.id'),
            )
            -&gt;leftJoin('product', 'product_section.product_id', '=', 'product.id')
            -&gt;where('section_id', $section-&gt;getId())
            -&gt;on('preRemove', function ($editor, $id, $values) use ($sectionId) {
                // On remove, the sequence needs to be updated to decrement all rows
                // beyond the deleted row. Get the current reading order by id (don't
                // use the submitted value in case of a multi-row delete).
                $order = $editor-&gt;db()
                    -&gt;select('product_section', 'rank', array('id' =&gt; $id))
                    -&gt;fetch();

                $editor-&gt;db()
                    -&gt;query('update', 'product_section')
                    -&gt;set('rank', '`rank`-1', false)
                    -&gt;where('rank', $order['rank'], '&gt;')
                    -&gt;and_where('section_id', $sectionId, '=')
                    -&gt;exec();
            })
            -&gt;on('preEdit', function ($editor, $id, $values) {
                // checks if we're editing via form or drag and drop.  name only present on editing form.
                if (isset($values['product_section']['product_id']) ?? false) {
                    $values = $values['product_section'];

                    $targetRank = (int)$values['rank'];
                    // check rank exists aleady
                    $order = $editor-&gt;db()
                        -&gt;select('product_section', 'id', array('rank' =&gt; $targetRank))
                        -&gt;fetch();
                    // don't allow user to enter a rank that doesn't already exist as this will create gaps
                    if ($order === false) {
                        return false;
                    }

                    $originalRank = (int)$editor-&gt;db()
                        -&gt;select('product_section', 'rank', array('id' =&gt; $id))
                        -&gt;fetch()['rank'];

                    if ($targetRank === $originalRank) {
                        return true;  // valid, but don't re-order anything
                    }

                    // higher rank (lower those inbetween to make room)
                    if ($targetRank &gt; $originalRank) {
                        $editor-&gt;db()
                            -&gt;query('update', 'product_section')
                            -&gt;set('rank', '`rank`-1', false)
                            -&gt;where('rank', $originalRank, '&gt;')
                            -&gt;and_where('rank', $targetRank, '&lt;=')
                            -&gt;and_where('section_id', (int)$values['section_id'], '=')
                            -&gt;exec();
                    }

                    // lower rank (increase those inbetween to make room)
                    if ($originalRank &gt; $targetRank) {
                        $editor-&gt;db()
                            -&gt;query('update', 'product_section')
                            -&gt;set('rank', '`rank`+1', false)
                            -&gt;where('rank', $originalRank, '&lt;')
                            -&gt;and_where('rank', $targetRank, '&gt;=')
                            -&gt;and_where('section_id', (int)$values['section_id'], '=')
                            -&gt;exec();
                    }
                }
            })
            -&gt;on('preCreate', function ($editor, $values) {
                $values = $values['product_section'] ?? null;
                if (isset($values['product_section']['product_id']) ?? false) {
                    // If no value submitted, then use the max+1 as the new value
                    $next = $editor-&gt;db()-&gt;sql('select IFNULL(MAX(`rank`)+1, 1) as next FROM product_section WHERE section_id = ' . (int)$values['section_id'])-&gt;fetch();
                    $editor-&gt;field('rank')-&gt;setValue($next['next']);
                } else {
                    // On create update all the other records to make room for our new one
                    $editor-&gt;db()
                        -&gt;query('update', 'product_section')
                        -&gt;set('rank', '`rank`+1', false)
                        -&gt;where('rank', $values['rank'], '&gt;=')
                        -&gt;and_where('section_id', (int)$values['section_id'], '=')
                        -&gt;exec();
                }
            })
            -&gt;process($_POST)
            -&gt;json(false); // false to return the json instead of echo.

    return JsonResponse::fromJsonString($json);
}
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Select2 is not loading the selected values when edit the row the first time in a page</title>
        <link>https://next.datatables.net/forums/discussion/79913/select2-is-not-loading-the-selected-values-when-edit-the-row-the-first-time-in-a-page</link>
        <pubDate>Wed, 25 Sep 2024 12:34:43 +0000</pubDate>
        <category>Select</category>
        <dc:creator>jose.tristan</dc:creator>
        <guid isPermaLink="false">79913@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I have tried to create a test case but there is any issue adding the libs. If you can give me any clue about how to finish the test case I will: <a rel="nofollow" href="https://live.datatables.net/kaquqexa/3/">https://live.datatables.net/kaquqexa/3/</a></p>

<p>I have one field of type select2 (blend) with option: multiple and other (format) allowing only single values. When I load the first time the page and edit a row the modal editor is loaded without the selected values. However, if I edit a second time the values are loaded.</p>

<pre><code>var editor = new DataTable.Editor({
        ajax: {
            create: '/save/${id}',
            edit: '/update/',
            remove: '/delete/',
            idSrc: 'id'
        },
        fields: [
            {
                name: 'DT_RowId',
                type: 'hidden',
            },
            {
                label: 'Blend',
                name: 'blend',
                type: "select2",
                separator: ":",
               opts: {
                    "multiple": true,
                    "allowClear": true,
                    "separator": ":",
                       "placeholder": {
                           "id": "",
                           "text":"(Select blends)"
                       }
                },
                options: [
                    { label: '', value: '' },
                    { label: '9000 Extra', value: '9000'},                    
                    { label: '9001 RA', value: '9001'},                    
                    { label: '9001 Col', value: '9001'},                    
                    { label: '900R Classic', value: '900R'}
                    
                ]
            },
            {
                label: 'Format',
                name: 'format',
                type: 'select2',
                options: [
                    { label: '', value: '' },
                    { label: '0000 Auxiliary Materials', value: '0000' },                    
                    { label: '0001 Lid 50g.', value: '0001' },
                ]
            },
            {
                label: 'Reference',
                name: 'reference',
                type: 'datatable',
                config: {
                    columns: [
                        {
                            title: 'Reference',
                            data: 'label'
                        }
                    ]
                },
                options: [
                        {label:'', value:''},
                        {
                            label: '9022 sp.20 Kg',
                            value: '8020'
                        },
                        
                        {
                            label: '22G0 spr.300Kg.',
                            value: '8023'
                        },
                        
                    ]
            },
            {
                label: 'Quantity',
                name: 'quantity'
            },
            {
                label: 'Unit',
                name: 'unit',
                def: 'KG',
                type: 'select',
                options: [
                     {label: 'Caja', value: 'BOX'},                    
                     {label: 'Kilo', value: 'KG'},
                ]
        },
        {
            label: 'Status',
            name: 'status',
            def: 'NO_ACTIVED',
            type: 'select',
            options: [
                {label: 'Activo', value: 'ACTIVED'},                
                {label: 'No activo', value: 'NO_ACTIVED'},
            ]
        },
        {
            label: 'quantity to reduce',
            name: 'quantityToBeReduced',
        },
                
        ],
            table: '#items'
        })
    ;




   var table = new DataTable('#items', {
        ajax:  {
            url: '/list/${id}'
        },
        columns: [
            { data: 'blends.description' },
            { data: 'formats.description' },
            { data: 'references.description' },
            { data: 'quantity' },
            { data: 'units.description' },
            { data: 'statuses.description' }            
        ],
        layout: {
            topStart: {
                buttons: [
                    { extend: 'create', editor: editor },
                    { extend: 'edit', editor: editor },
                    { extend: 'remove', editor: editor }
                ]
            }
        },
        select: true
    });

</code></pre>

<p>Thank you very much.</p>
]]>
        </description>
    </item>
    <item>
        <title>Unexpected behaviour of custom sort reset</title>
        <link>https://next.datatables.net/forums/discussion/79733/unexpected-behaviour-of-custom-sort-reset</link>
        <pubDate>Mon, 26 Aug 2024 23:21:39 +0000</pubDate>
        <category>Select</category>
        <dc:creator>seaninjapan</dc:creator>
        <guid isPermaLink="false">79733@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<a rel="nofollow" href="https://live.datatables.net/yecebura/2/edit">https://live.datatables.net/yecebura/2/edit</a><br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:<br />
Our custom sort reset function that we used in 1.x version already started to fail under specific circumstances in our regression test.<br />
I think it is a bug and created an example test case in order to reproduce it easily.<br />
The datatable with the <code>defaultOrder</code> of only one sort <code>[[0, 'asc']]</code> needs to be loaded correctly.<br />
Then i changed the the sort order manually on the first column to not being sorted at all. Press the 'Reset' button and the default order is <code>[0, '']</code>. I manually changed the sort order of other columns afterwards and pressed the reset button. Several combinations leading to several outcomes. Sometimes the original sort is set, sometimes the <code>[0, '']</code> is set.</p>

<p>I actually thought that it works flawless with two or more sort order configurations, but it turns out that there is a similar flaw. When setting the sort order of the table to none by clicking on the first column and pressing the reset button ends up in just resetting the second column. Where as doing it on any column &gt; 1, it always resets the correct order.</p>

<p>I added the state to the table, because we have it too, but it turned out that it seems not to impact the behaviour.<br />
Is this behaviour intended? Is there any way to prevent this?</p>

<p>Please let me know if anything is unclear.</p>
]]>
        </description>
    </item>
    <item>
        <title>Typedefinition for select-render method missing</title>
        <link>https://next.datatables.net/forums/discussion/79728/typedefinition-for-select-render-method-missing</link>
        <pubDate>Mon, 26 Aug 2024 04:56:04 +0000</pubDate>
        <category>Select</category>
        <dc:creator>seaninjapan</dc:creator>
        <guid isPermaLink="false">79728@/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>:<br />
The select-method used in examples for the select-extension has no typescript definition.<br />
<code>{</code>
<code>render: DataTable.render.select()</code>
<code>}</code></p>

<p>I could not find an entry in the <code>DataTablesStaticRender</code> for the <code>DataTable.render.select = function (valueProp, nameProp)</code></p>

<p>would it be possible to add it?</p>
]]>
        </description>
    </item>
    <item>
        <title>Deselect when selecting another row vs deselect when not selecting another row</title>
        <link>https://next.datatables.net/forums/discussion/79398/deselect-when-selecting-another-row-vs-deselect-when-not-selecting-another-row</link>
        <pubDate>Mon, 15 Jul 2024 09:50:50 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">79398@/forums/discussions</guid>
        <description><![CDATA[<p>Is there a way to distinguish between these two events?</p>

<p>I have a table with <a rel="nofollow" href="//datatables.net/reference/option/toggleable"><code title="DataTables initialisation option">toggleable</code></a> set to <code>true</code>.  I use the selected row to filter a secondary table (which is actually done using <a rel="nofollow" href="//datatables.net/reference/api/ajax.reload()"><code title="DataTables API method">ajax.reload()</code></a> on the secondary table during the main table's <a rel="nofollow" href="//datatables.net/reference/event/select"><code title="DataTables event">select</code></a> event.</p>

<p>If I select Row A and then Row B, it fires <a rel="nofollow" href="//datatables.net/reference/event/deselect"><code title="DataTables event">deselect</code></a> on Row A and <a rel="nofollow" href="//datatables.net/reference/event/select"><code title="DataTables event">select</code></a> on Row B, which reloads the secondary table like I would like, but when I <a rel="nofollow" href="//datatables.net/reference/event/deselect"><code title="DataTables event">deselect</code></a> Row B for no other row it does not reload the secondary table because there was no <a rel="nofollow" href="//datatables.net/reference/event/select"><code title="DataTables event">select</code></a>.</p>

<p>If I add the <a rel="nofollow" href="//datatables.net/reference/api/ajax.reload()"><code title="DataTables API method">ajax.reload()</code></a> on the secondary table to the <a rel="nofollow" href="//datatables.net/reference/event/deselect"><code title="DataTables event">deselect</code></a> event on the main table then when I select Row A and then Row B, <a rel="nofollow" href="//datatables.net/reference/event/deselect"><code title="DataTables event">deselect</code></a> fires on Row A and <a rel="nofollow" href="//datatables.net/reference/event/select"><code title="DataTables event">select</code></a> fires on Row B causing the secondary table to do two <a rel="nofollow" href="//datatables.net/reference/api/ajax.reload()"><code title="DataTables API method">ajax.reload()</code></a> although only one is needed.</p>

<p>I can introduce a new variable outside the tables themselves to address this, but I was hoping something out-of-the-box exists.</p>
]]>
        </description>
    </item>
    <item>
        <title>DataTable.destroy does not remove  checkbox from table header</title>
        <link>https://next.datatables.net/forums/discussion/79357/datatable-destroy-does-not-remove-checkbox-from-table-header</link>
        <pubDate>Mon, 08 Jul 2024 14:26:39 +0000</pubDate>
        <category>Select</category>
        <dc:creator>d3</dc:creator>
        <guid isPermaLink="false">79357@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I've recently upgraded to DataTables v2 and appreciate the improved checkboxes feature on the Select plugin.  One thing I noticed though - if I call <code>destroy()</code> on my DataTable, the header <code>&lt;input&gt;</code> field remains and I have to remove it manually like this:</p>

<p><code>$('#main-table &gt; thead &gt; tr &gt; th &gt; input').remove();</code></p>

<p>Not a big problem, but I would have expected the HTML to be reset to the original state, per the documentation.</p>

<p>-David.</p>
]]>
        </description>
    </item>
    <item>
        <title>Keep selected record on page during search</title>
        <link>https://next.datatables.net/forums/discussion/76943/keep-selected-record-on-page-during-search</link>
        <pubDate>Sun, 13 Aug 2023 10:46:03 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">76943@/forums/discussions</guid>
        <description><![CDATA[<p>I've tried doing this a couple of different ways without success, but I'd like to set the current page of a search to the one with a selected record if there is one.</p>

<p>For example, using the Select initialization example: <a rel="nofollow" href="https://www.datatables.net/extensions/select/examples/initialisation/simple.html">https://www.datatables.net/extensions/select/examples/initialisation/simple.html</a></p>

<p>1) Go to Page 6 and select "Zorita Serrano"<br />
2) In the search type "S" for San Francisco</p>

<p>The table is reset to the first page of the search results and the selected record goes to the second page.</p>

<p>I've tried to use the (excellent) <a rel="nofollow" href="//datatables.net/reference/api/row().show()"><code title="DataTables API method">row().show()</code></a> plugin or the plan old <a rel="nofollow" href="//datatables.net/reference/api/page()"><code title="DataTables API method">page()</code></a> on the <a rel="nofollow" href="//datatables.net/reference/event/search"><code title="DataTables event">search</code></a> but then it requires a <a rel="nofollow" href="//datatables.net/reference/api/draw()"><code title="DataTables API method">draw()</code></a>, which in turn triggers another <a rel="nofollow" href="//datatables.net/reference/event/search"><code title="DataTables event">search</code></a>, which triggers another <a rel="nofollow" href="//datatables.net/reference/api/draw()"><code title="DataTables API method">draw()</code></a>, etc., causing an overflow.</p>

<p>Although this ability would be helpful overall, it would be particularly useful when using DataTables as an input so that it is highlighted to the user that there is already a selection made even though they are searching.</p>

<p>Any suggestions that would help me escape that <a rel="nofollow" href="//datatables.net/reference/event/search"><code title="DataTables event">search</code></a> <a rel="nofollow" href="//datatables.net/reference/api/draw()"><code title="DataTables API method">draw()</code></a> loop?</p>
]]>
        </description>
    </item>
    <item>
        <title>How to make OR statement with this :</title>
        <link>https://next.datatables.net/forums/discussion/75832/how-to-make-or-statement-with-this</link>
        <pubDate>Mon, 20 Mar 2023 06:31:41 +0000</pubDate>
        <category>Select</category>
        <dc:creator>stancaballero</dc:creator>
        <guid isPermaLink="false">75832@/forums/discussions</guid>
        <description><![CDATA[<p>-&gt;select( 'tbl_branchpersonel_master', ['tbl_branchpersonel_master.employee as value', 'tbl_branchpersonel_master.employee as label'], ['tbl_branchpersonel_master.regionname' =&gt; $_REQUEST['values']['tbl_branch_incentives_master.regionname'], 'tbl_branchpersonel_master.branchname' =&gt; $_REQUEST['values']['tbl_branch_incentives_master.branchname']], ['label ASC'] )<br />
-&gt;fetchAll();</p>
]]>
        </description>
    </item>
    <item>
        <title>Get innerhtml from selected rows</title>
        <link>https://next.datatables.net/forums/discussion/75266/get-innerhtml-from-selected-rows</link>
        <pubDate>Fri, 27 Jan 2023 21:02:09 +0000</pubDate>
        <category>Select</category>
        <dc:creator>hpegmslicensemgmt</dc:creator>
        <guid isPermaLink="false">75266@/forums/discussions</guid>
        <description><![CDATA[<p>Dear all,<br />
I have a few tables with some monitoring information.<br />
One Column holds the "Host Name" within a &lt;span&gt; - the position of the "Host Name" may vary from one report to the other.<br />
The HTML in the Cell looks like this:</p>

<p>&lt;span class='.ServerTag'&gt;myhostname.mydomain.com&lt;/span&gt;</p>

<p><img src="https://datatables.net/forums/uploads/editor/b5/4npxqm2znzhu.png" alt="" title="" /></p>

<p>I use the "select" extension to be able to select some rows out of the whole list.</p>

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

<p>Is there a way to get all the "Host Names" with the class "ServerTag" from the selected list ?</p>

<p>Best regards,<br />
David</p>
]]>
        </description>
    </item>
    <item>
        <title>Page of selected record</title>
        <link>https://next.datatables.net/forums/discussion/74841/page-of-selected-record</link>
        <pubDate>Wed, 07 Dec 2022 16:16:45 +0000</pubDate>
        <category>Select</category>
        <dc:creator>rf1234</dc:creator>
        <guid isPermaLink="false">74841@/forums/discussions</guid>
        <description><![CDATA[<p>How can I get the page index of the record currently selected?</p>

<p>My use case:<br />
The user selects a record, all non-selected records are excluded from display. The user edits the record and saves it. Since the table order is influenced by the editing the selected record is usually no longer on the same page. Hence the user sees an empty page because the selected record - which is the only visible record - is no longer on that page. I would like to navigate to the page of the selected record on "submitSuccess".</p>
]]>
        </description>
    </item>
    <item>
        <title>Disallow selection on first and last column.</title>
        <link>https://next.datatables.net/forums/discussion/74627/disallow-selection-on-first-and-last-column</link>
        <pubDate>Fri, 11 Nov 2022 21:53:21 +0000</pubDate>
        <category>Select</category>
        <dc:creator>mnash1579</dc:creator>
        <guid isPermaLink="false">74627@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: n/a<br />
<strong>Debugger code (debug.datatables.net)</strong>: n/a<br />
<strong>Error messages shown</strong>: n/a<br />
<strong>Description of problem</strong>: I'm trying to figure out how to disable the row selection on the first <strong>and</strong> last column. I can successfully disable it on <strong>either</strong> but not <strong>both</strong>.</p>

<p>Referencing the docs here: <a rel="nofollow" href="https://datatables.net/reference/option/select.selector">https://datatables.net/reference/option/select.selector</a></p>

<pre><code>select: {
    style: 'single',
    selector: 'td:not(:last-child)' // no row selection on last column
},
</code></pre>

<p>OR</p>

<pre><code>select: {
    style: 'single',
    selector: 'td:not(:first-child)' // no row selection on first column
},
</code></pre>

<p>Both of these work as expected but I want to combine them. I have tried:</p>

<pre><code>select: {
    style: 'single',
    selector: 'td:not(:first-child), td:not(:last-child)'
},
</code></pre>

<p>but that breaks it completely. What am I missing, any thoughts? Thanks!</p>
]]>
        </description>
    </item>
    <item>
        <title>Selection across multiple tables</title>
        <link>https://next.datatables.net/forums/discussion/72774/selection-across-multiple-tables</link>
        <pubDate>Wed, 18 May 2022 05:44:38 +0000</pubDate>
        <category>Select</category>
        <dc:creator>nick-genesis</dc:creator>
        <guid isPermaLink="false">72774@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="http://live.datatables.net/yamoxafu/1/edit">http://live.datatables.net/yamoxafu/1/edit</a></p>

<p>First up, thanks Allan and co for all your work on DataTables!  I've been using it for a while now and find it very useful...</p>

<p>I've got a situation where I have several similar (not identical, but close) datatables in different tabs on a single page.  I want to enable 'os' style selection and somehow keep the selected items synchronised between the tables.  i.e. any user initiated select action on any table propagates to the other tables.</p>

<p>See the test case of a scaled down example where I have implemented something similar to what I need, by using the the 'user-select' event, and basically re-implementing the select action.  In this example though I've basically replicated the 'multi' select style, whereas I want the select style to be the 'os' style.</p>

<p>I've looked at using the 'select' event, which gives indexes of the new selection, except that this event is triggered whether the select is initiated by the user or the API. I need to act on the event if it's initiated by the user, but not the API, otherwise I would just create an endless loop.</p>

<p>Am I missing an obvious way to do this?   Any ideas or suggestions?</p>

<p>Thanks,<br />
Nick</p>
]]>
        </description>
    </item>
    <item>
        <title>Issue on size of the select tick mark</title>
        <link>https://next.datatables.net/forums/discussion/72192/issue-on-size-of-the-select-tick-mark</link>
        <pubDate>Tue, 29 Mar 2022 15:55:32 +0000</pubDate>
        <category>Select</category>
        <dc:creator>fabioberetta</dc:creator>
        <guid isPermaLink="false">72192@/forums/discussions</guid>
        <description><![CDATA[<p>I have recently upgraded to latest datatables and editor versions. I am also using select.</p>

<p>The select tick mark is too big and placed too low compared to the checkbox. I have modified the select.bootstrap.css file as follows to have the corrected.</p>

<pre><code>table.dataTable tr.selected td.select-checkbox:after,
table.dataTable tr.selected th.select-checkbox:after {
  content: "\2714";
  font-size: 13px;
  margin-top: -11px;
  margin-left: -4px;
  text-align: center;
  /*text-shadow: 1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9;*/
}
</code></pre>

<p>May be should be corrected in your css file.</p>
]]>
        </description>
    </item>
    <item>
        <title>Get data from selected row</title>
        <link>https://next.datatables.net/forums/discussion/72253/get-data-from-selected-row</link>
        <pubDate>Sun, 03 Apr 2022 11:58:48 +0000</pubDate>
        <category>Select</category>
        <dc:creator>koTech</dc:creator>
        <guid isPermaLink="false">72253@/forums/discussions</guid>
        <description><![CDATA[<p>I am not able to get the data from the row I have selected.</p>

<p>This is my table:</p>

<pre><code>  &lt;table id="stekTable" class="table table-hover"&gt;
  &lt;!-- &lt;table id="stekTable" class="table table-striped table-hover"&gt; --&gt;

    &lt;thead style="color: #F8F8FF; background-color: #191919 "&gt;
      &lt;tr&gt;
        &lt;th&gt;Id&lt;/th&gt;
        &lt;th&gt;Stek&lt;/th&gt;
        &lt;th&gt;Type&lt;/th&gt;
        &lt;th&gt;Water&lt;/th&gt;
        &lt;th&gt;Beschrijving&lt;/th&gt;
        &lt;th&gt;Plaats&lt;/th&gt;
        &lt;th&gt;Latitude&lt;/th&gt;
        &lt;th&gt;Eigenaar&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      {% for stek, user, stektype in stekken %}
        &lt;tr&gt;  
          &lt;td&gt;{{ stek.id }}&lt;/td&gt;
          &lt;td&gt;{{ stek.name }}&lt;/td&gt;
          &lt;td&gt;{{ stektype.stektype }}&lt;/td&gt;
          &lt;td&gt;{{ stek.water }}&lt;/td&gt;
          &lt;td&gt;{{ stek.description }}&lt;/td&gt;
          &lt;td&gt;{{ stek.place }}&lt;/td&gt;
          &lt;td&gt;{{ stek.latitude }}&lt;/td&gt;
          &lt;td&gt;{{ user.username }}&lt;/td&gt;
        &lt;/tr&gt;
      {% endfor %}
    &lt;/tbody&gt;
  &lt;/table&gt;
</code></pre>

<p>This is my JS:</p>

<pre><code>  &lt;script&gt;
    $(document).ready(function () {
      var table = $('#stekTable').DataTable( {
          dom: 'Bfrtip',
          buttons: ['copy','excel'],        
          paging: true, 
          pageLength: 50,
          scrollY: '50vh',
          scrollCollapse: true,
          columns: [null, {orderable: false}, {orderable: false}, null, null, null,null, null],
          rowGroup: {
            dataSrc: '0',
            startRender: function ( rows, group ) {return group +' ('+rows.count()+' stekTypen)'}
          },
          select: { items: 'row', style:'single' }
      });

      table.on( 'select', function ( e, dt, type, indexes ) {
        if ( type === 'row' ) {
            var x = table.rows().data().pluck('Stek');
            document.getElementById('selectedStek').value = x;  
            document.getElementById("selectedStek").style.color = "blue"; 
        }
      });

      table.on( 'deselect', function ( e, dt, type, indexes ) {
        if ( type === 'row' ) {
            document.getElementById('selectedStek').value = "Geen stek geselecteerd"; 
            document.getElementById("selectedStek").style.color = "blue"; 
        }
      });
      
    });
   
  &lt;/script&gt;

</code></pre>

<p>I think the problem is in this code block:</p>

<pre><code>      table.on( 'select', function ( e, dt, type, indexes ) {
        if ( type === 'row' ) {
            var x = table.rows().data().pluck('Stek');
            document.getElementById('selectedStek').value = x;  
            document.getElementById("selectedStek").style.color = "blue"; 
        }
      });

</code></pre>

<p>I have tried many things and almost threw my laptop out of the window.</p>

<p>With this statement for x I get [object Object] - that's is something !</p>

<p>But I am not able to access the properties.<br />
I tried x[0], x[1], x.name, ...</p>

<p>I need some help with this.</p>
]]>
        </description>
    </item>
    <item>
        <title>Select List with WHERE</title>
        <link>https://next.datatables.net/forums/discussion/72134/select-list-with-where</link>
        <pubDate>Wed, 23 Mar 2022 23:23:10 +0000</pubDate>
        <category>Select</category>
        <dc:creator>cemlimited</dc:creator>
        <guid isPermaLink="false">72134@/forums/discussions</guid>
        <description><![CDATA[<p>When using a Join to populate a Select drop down in a table field from another table, Is it possible to submit a value to the controller to limit the items in the list?</p>

<p>I know the main table can be filtered using $aaa-&gt;where( '$table.$field', $target, '=');<br />
but i also need the options to be filtered....</p>

<p>Something like adding <strong>'WHERE <code>user</code> = $variable</strong>  at the location shown with the ///// below</p>

<p>$table = Main Datatable Source<br />
$table has two fields (field 1 &amp; 4) in it corresponding to lists from 2 other tables (table1 and table4)</p>

<p>$selects = array('field1', 'field4');<br />
$selectstable = array('table1', 'table4');<br />
$selectslabels = array('field2', 'field5');</p>

<p>(field2 would be a value from table1 corresponding to field1)<br />
(field5 would be a value from table2 corresponding to field4)</p>

<p>While table4 may have 15 items in it, I only want the items where possibly field 7 from table 4 is 0</p>

<pre><code>foreach($selects as $select){
    $aaa -&gt;field(Field::inst($table.'.'.$select)
                  -&gt;options( Options::inst()-&gt;table( $selectstable[$cycle] )
                      -&gt;value( 'id' )
                         -&gt;label( $selectslabels[$cycle] ))
                         -&gt;validator( Validate::dbValues()));
    $aaa -&gt;field(Field::inst( $selectstable[$cycle].'.'.$selectslabels[$cycle]));
    $aaa -&gt;leftJoin( $selectstable[$cycle],$selectstable[$cycle].'.id', '=', $table.'.'.$select//// );
    $cycle = $cycle + 1;
}
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Sum values of selected rows</title>
        <link>https://next.datatables.net/forums/discussion/72102/sum-values-of-selected-rows</link>
        <pubDate>Mon, 21 Mar 2022 09:31:44 +0000</pubDate>
        <category>Select</category>
        <dc:creator>ludwigm</dc:creator>
        <guid isPermaLink="false">72102@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
I would like to sum the values of one column of the selected rows. The sum should be added in brackets in <em><a rel="nofollow" href="https://datatables.net/reference/option/language.select.rows" title="language.select.rows">language.select.rows</a></em> . How can I do this in the most efficient way?<br />
Otherwise I would do this manually with jQuery and find the element by the find() method...</p>
]]>
        </description>
    </item>
    <item>
        <title>How to deselect() all rows BUT passing data to de event</title>
        <link>https://next.datatables.net/forums/discussion/72066/how-to-deselect-all-rows-but-passing-data-to-de-event</link>
        <pubDate>Wed, 16 Mar 2022 13:15:45 +0000</pubDate>
        <category>Select</category>
        <dc:creator>barleby</dc:creator>
        <guid isPermaLink="false">72066@/forums/discussions</guid>
        <description><![CDATA[<p>From <strong><em>File a.js</em></strong> I'm deselecting all rows in my Table with: <code>table.rows().deselect();</code><br />
In <strong><em>file b.js</em></strong> I have a listener:</p>

<p><code>table.on("select.dt deselect.dt", function (e, dt, type, indexes) { /* my code */ })</code></p>

<p>For the logic of my app, I need to pass some data along when calling deselect(). But <em>deselect()</em>, doesn't take in any parameter.<br />
I tried to 'simulate' the  deselect.dt event via:</p>

<p><code>table.trigger('deselect.dt', {dataToBePassed});</code></p>

<p>But the _on() _listener callback won't be called.<br />
Any Idea on how I could deselect all row while passing data to the event?</p>

<p>Thanks!!!</p>
]]>
        </description>
    </item>
    <item>
        <title>is a row selected</title>
        <link>https://next.datatables.net/forums/discussion/71943/is-a-row-selected</link>
        <pubDate>Sun, 06 Mar 2022 04:27:16 +0000</pubDate>
        <category>Select</category>
        <dc:creator>montoyam</dc:creator>
        <guid isPermaLink="false">71943@/forums/discussions</guid>
        <description><![CDATA[<p>I know I have done this many times, but for some reason I can't get it to work now.  I need to identify if a row is selected.  The count is returning the incorrect value:</p>

<p><a rel="nofollow" href="http://live.datatables.net/siracilo/1/edit">http://live.datatables.net/siracilo/1/edit</a></p>
]]>
        </description>
    </item>
    <item>
        <title>Information Visualization using Select and Language</title>
        <link>https://next.datatables.net/forums/discussion/71183/information-visualization-using-select-and-language</link>
        <pubDate>Fri, 07 Jan 2022 17:30:19 +0000</pubDate>
        <category>Select</category>
        <dc:creator>alakentu</dc:creator>
        <guid isPermaLink="false">71183@/forums/discussions</guid>
        <description><![CDATA[<p>Hello everyone and happy new year. I searched the forum and couldn't find a favorable answer.</p>

<p><strong>Link to test case</strong>: <a rel="nofollow" href="http://live.datatables.net/qifibobo/1/edit">http://live.datatables.net/qifibobo/1/edit</a></p>

<p><strong>Description of problem</strong>:<br />
I use the latest version of Datatables with <strong>Bootstrap 5</strong>. I use the Select extension with Internationalization with <strong>Spanish</strong> language and <strong>Checkbox selection</strong>.</p>

<p>My problem is that the information of rows, columns and cells is always shown without selecting, using Datatables without language this does not happen, it only shows this information only when a row, column or cell is selected.</p>

<p>Is there a way to hide the row, column, and cell information when these have not been selected and only show the information once one of them is selected, as is the case with Datatables in English.</p>

<p>I hope I have explained myself well. Thanks in advance.</p>
]]>
        </description>
    </item>
    <item>
        <title>Highlighting selected row</title>
        <link>https://next.datatables.net/forums/discussion/71795/highlighting-selected-row</link>
        <pubDate>Tue, 22 Feb 2022 21:15:32 +0000</pubDate>
        <category>Select</category>
        <dc:creator>genesys_kumar</dc:creator>
        <guid isPermaLink="false">71795@/forums/discussions</guid>
        <description><![CDATA[<p>Code Link: <a rel="nofollow" href="https://github.com/ramkumar2325/DataTable_Sample">https://github.com/ramkumar2325/DataTable_Sample</a></p>

<p>I have uploaded source code here, issue is when I click any row it is not highlighting.  Initially, it worked but after sometime it stopped working.</p>

<p>can someone please help me with this issue.</p>
]]>
        </description>
    </item>
    <item>
        <title>Automatically select row if cell has class</title>
        <link>https://next.datatables.net/forums/discussion/71724/automatically-select-row-if-cell-has-class</link>
        <pubDate>Fri, 18 Feb 2022 06:35:00 +0000</pubDate>
        <category>Select</category>
        <dc:creator>karibusana</dc:creator>
        <guid isPermaLink="false">71724@/forums/discussions</guid>
        <description><![CDATA[<p>Hi<br />
I'm using datatables with the select plugin, I need to automatically select a row if a cell in that row has a specific class in particular my class is called .favourite<br />
My data come from server side and I use ajax to load them into datatable, this is how the html looks like <a rel="nofollow" href="https://codepen.io/karibusana/pen/jOaZbNB" title="https://codepen.io/karibusana/pen/jOaZbNB"></a><a rel="nofollow" href="https://codepen.io/karibusana/pen/jOaZbNB">https://codepen.io/karibusana/pen/jOaZbNB</a> so you can see the class .favourite</p>

<p>I've tried with rowCallback</p>

<pre><code>      rowCallback: function(row, data, index) {

              var cellValue = data["descrizione"];

              if($(cellValue).find('.favourite')){

               dataTable.row().select();

              }
            }
</code></pre>

<p>But all it does is select the first row and not the one with .favourite class. Can anybody help me please? many thanks</p>
]]>
        </description>
    </item>
    <item>
        <title>Select checkbox to low in Bootstrap 4 and 5 styling</title>
        <link>https://next.datatables.net/forums/discussion/71669/select-checkbox-to-low-in-bootstrap-4-and-5-styling</link>
        <pubDate>Tue, 15 Feb 2022 14:31:51 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Wooly65</dc:creator>
        <guid isPermaLink="false">71669@/forums/discussions</guid>
        <description><![CDATA[<p><a rel="nofollow" href="http://live.datatables.net/qaxocetu/1/edit?html,js,output" title="live.datatables.net/qaxocetu/1/edit?html,js,output">live.datatables.net/qaxocetu/1/edit?html,js,output</a></p>

<p>For Bootstrap4 and Bootstrap5 the margin-top was previously -6px but now it is set to -2px which is to low as seen in the example.  For the DataTables CSS it is still set at -6px.</p>

<p><strong>Select CheckBox and Bootstrap5 CSS</strong><br />
<img src="https://datatables.net/forums/uploads/editor/ai/y6p2xk7b0chu.png" alt="" title="" /><br />
<img src="https://datatables.net/forums/uploads/editor/a6/9xtd7a6pg7k8.png" alt="" title="" /></p>

<p><strong>Select CheckBox and DataTable CSS</strong><br />
<img src="https://datatables.net/forums/uploads/editor/dy/0px9you4ii2s.png" alt="" title="" /><br />
<img src="https://datatables.net/forums/uploads/editor/92/shc3img82g5m.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Sort by selected row</title>
        <link>https://next.datatables.net/forums/discussion/71680/sort-by-selected-row</link>
        <pubDate>Wed, 16 Feb 2022 07:09:09 +0000</pubDate>
        <category>Select</category>
        <dc:creator>ludwigm</dc:creator>
        <guid isPermaLink="false">71680@/forums/discussions</guid>
        <description><![CDATA[<p>How can I sort the DataTable by <code>.selected</code> class? The class is added by the select plugin.<br />
They should be shown first.</p>
]]>
        </description>
    </item>
    <item>
        <title>How do I get the value of row/column element?</title>
        <link>https://next.datatables.net/forums/discussion/71667/how-do-i-get-the-value-of-row-column-element</link>
        <pubDate>Tue, 15 Feb 2022 13:06:25 +0000</pubDate>
        <category>Select</category>
        <dc:creator>drfunk</dc:creator>
        <guid isPermaLink="false">71667@/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>select style 'api' not working</title>
        <link>https://next.datatables.net/forums/discussion/71617/select-style-api-not-working</link>
        <pubDate>Fri, 11 Feb 2022 13:08:54 +0000</pubDate>
        <category>Select</category>
        <dc:creator>Francesco Di Sciascio</dc:creator>
        <guid isPermaLink="false">71617@/forums/discussions</guid>
        <description><![CDATA[<p>Hi everyone,<br />
I'm facing a trouble with DataTables select plugin; in particular, it seems that the 'api' style selection already allows user to select rows of table, but I expected that it doesn't, as read in api reference <a rel="nofollow" href="https://datatables.net/reference/api/select.style()" title="here">here</a>.<br />
I would set the style in the initComplete() callback, but it doesn't work too: rows are always selectable</p>

<p>Here's the code of table initialization:</p>

<pre><code>prestDaSelezionareTable = $('#prestDaSelezionareTable').DataTable({
                    ajax: {
                        url: url,
                        dataSrc: ""
                    },
                    columns: [
                        {"data": "codice"},
                        {"data": "prestazione"},
                        {"data": "statoPrestazione"},
                        {"data": "giorno"},
                        {"data": "sconto"}
                    ],
                    columnDefs: [
                        {
                            targets: 'thHidden',
                            visible: false
                        },
                        {
                            targets: COLONNA_GIORNO,
                            render: $.fn.dataTable.render.moment('MMM D, YYYY HH:mm:ss A', 'DD/MM/YYYY')
                        }],
                    language: {
                        "url": "//cdn.datatables.net/plug-ins/1.11.3/i18n/it_it.json"
                    },
                    select: {
                        style: 'api',
                        info: false
                    },                   
                });
</code></pre>

<p>Thanks for the suggestions.<br />
Regards</p>
]]>
        </description>
    </item>
   </channel>
</rss>
