Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all 82534 articles
Browse latest View live

Accessibility issue with FixedHeader in data tables containing links

$
0
0

Link to test case: https://live.datatables.net/qacedomo/1
Debugger code (debug.datatables.net): N/A
Error messages shown: N/A
Description of problem:

I have a data table that contains links. We are trying to get the data table compliant with the following WCAG 2.2 rule: 2.4.11 Focus Not Obscured (https://www.w3.org/WAI/standards-guidelines/wcag/new-in-22/#2411-focus-not-obscured-minimum-aa ). What is happening in the test case above is temporary obstruction of the rows when tabbing backward with the keyboard.

To reproduce the issue using the test case above, tab through the data table until you reach the bottom row and then tab backwards. Notice that as you tab backwards, rows you tab to are temporarily hidden behind the Fixed Header - this makes our data table implementation not compliant with the above WCAG 2.2 rule.

Does anyone have an idea on how to improve the accessibility of this data table? One idea I have is to use JavaScript to detect the position of the element user is tabbing to and then automatically scroll user to a position that they can fully see the row, but wanted to see if other people had other ideas or maybe already have a working solution to this issue.

Note: what I also noticed is that behavior in Firefox is different than in Chrome, but in both browsers rows temporarily are obstructed by FixedHeader during tabbing backwards.

Thanks in advance for any help on this.


Sorting

$
0
0

Found an issue when clicking on a column sort for the first time the down arrow enables for desc that is fine. Then clicking the sort again enables the up arrow for asc which also fine. Then clicking sort again disables both the up and down arrow when expecting a down arrow to enable that causes issues. How to set datatables so that on the third click the down arrow desc sort is called?

Limits on Uploads

$
0
0

This code will only le me upload 62 rows at a time. I have 68 rows in the file and the entire file is 5kb. It is giving me a system error. Do I need to change a setting. Below is the error in the error log and the code.

[29-Jun-2024 17:09:18 UTC] PHP Fatal error: Uncaught PDOException: There is no active transaction in /home/lib_inventory/Database/Query.php:204
Stack trace:

rollBack()">rollBack()" href="#0-/home/lib_inventory/Database/Query.php(204):-PDO->rollBack()">0 /home/lib_inventory/Database/Query.php(204): PDO->rollBack()

1 [internal function]: DataTables\Database\Query::rollback(Object(PDO))

2 /home/lib_inventory/Database.php(314): call_user_func('DataTables\Data...', Object(PDO))

rollback()">rollback()" href="#3-/home/lib_inventory/Editor.php(708):-DataTables\Database->rollback()">3 /home/lib_inventory/Editor.php(708): DataTables\Database->rollback()

process(Array)">process(Array)" href="#4-/home/n/in_process_raw_material_types_import_export.php(122):-DataTables\Editor->process(Array)">4 /home/n/in_process_raw_material_types_import_export.php(122): DataTables\Editor->process(Array)

5 {main}

thrown in /lib_inventory/Database/Query.php on line 204

<?php
/*
 * Example PHP implementation used for the index.html example
 */

// DataTables PHP library
include( "../lib_inventory/DataTables.php" );

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

// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'in_process_raw_material_types' )
    ->fields(
    Field::inst( 'id' ),
    Field::inst( 'type' ),
    Field::inst( 'type_ip' ),
    Field::inst( 'shipped' ),
    Field::inst( 'type_fp' ),
    Field::inst( 'status' ),
    Field::inst( 'usable' ),
    Field::inst( 'expiration_date' ),
    Field::inst( 'ea' ),
    Field::inst( 'bulk' ),
    Field::inst( 'bulk_tabcap' ),
    Field::inst( 'tab_cap' ),
    Field::inst( 'blister' ),
    Field::inst( 'fp' ),
    Field::inst( 'master_case' ),
    Field::inst( 'pallet' ),
    Field::inst( 'primary_marker' ),
    Field::inst( 'primary_tracker' ),
    Field::inst( 'revision' ),
    Field::inst( 'version' ),
    Field::inst( 'order_id' ),
    Field::inst( 'NR' ),
    Field::inst( 'CR' ),
    Field::inst( 'CA' ),
    Field::inst( 'added_by' ),
    Field::inst( 'date_added' ),
    Field::inst( 'new_entry_note' ),
    Field::inst( 'updated_by' ),
    Field::inst( 'date_updated' ),
    Field::inst( 'update_notes' ),
    Field::inst( 'approval_qc1' ),
    Field::inst( 'approved_by_qc1' ),
    Field::inst( 'approved_qc1_date' ),
    Field::inst( 'approval_qc1_comment' ),
    Field::inst( 'approval_qc2' ),
    Field::inst( 'approved_by_qc2' ),
    Field::inst( 'approved_qc2_date' ),
    Field::inst( 'approval_qc2_comment' ),
    Field::inst( 'approval_qc3' ),
    Field::inst( 'approved_by_qc3' ),
    Field::inst( 'approved_qc3_date' ),
    Field::inst( 'approval_qc3_comment' ),
    Field::inst( 'approval_qc4' ),
    Field::inst( 'approved_by_qc4' ),
    Field::inst( 'approved_qc4_date' ),
    Field::inst( 'approval_qc4_comment' ),
    Field::inst( 'approval_qc5' ),
    Field::inst( 'approved_by_qc5' ),
    Field::inst( 'approved_qc5_date' ),
    Field::inst( 'approval_qc5_comment' ),
    Field::inst( 'approval_mfg1' ),
    Field::inst( 'approved_by_mfg1' ),
    Field::inst( 'approved_mfg1_date' ),
    Field::inst( 'approval_mfg1_comment' ),
    Field::inst( 'approval_mfg2' ),
    Field::inst( 'approved_by_mfg2' ),
    Field::inst( 'approved_mfg2_date' ),
    Field::inst( 'approval_mfg2_comment' ),
    Field::inst( 'approval_mfg3' ),
    Field::inst( 'approved_by_mfg3' ),
    Field::inst( 'approved_mfg3_date' ),
    Field::inst( 'approval_mfg3_comment' ),
    Field::inst( 'approval_mfg4' ),
    Field::inst( 'approved_by_mfg4' ),
    Field::inst( 'approved_mfg4_date' ),
    Field::inst( 'approval_mfg4_comment' ),
    Field::inst( 'approval_mfg5' ),
    Field::inst( 'approved_by_mfg5' ),
    Field::inst( 'approved_mfg5_date' ),
    Field::inst( 'approval_mfg5_comment' ),
    Field::inst( 'qc1_revision' ),
    Field::inst( 'qc2_revision' ),
    Field::inst( 'qc3_revision' ),
    Field::inst( 'qc4_revision' ),
    Field::inst( 'qc5_revision' ),
    Field::inst( 'mfg1_revision' ),
    Field::inst( 'mfg2_revision' ),
    Field::inst( 'mfg3_revision' ),
    Field::inst( 'mfg4_revision' ),
    Field::inst( 'mfg5_revision' ),
    Field::inst( 'mfg_approvers_revision' ),
    Field::inst( 'qc_approvers_revision' ),
    Field::inst( 'cid' ),
        Field::inst( 'added_by' )->set( Field::SET_CREATE )
    )
    ->on( 'preCreate', function ( $editor, $values ) {
        $editor
            ->field( 'cid' )
            ->setValue( $_SESSION['update_cid'] );
    } )
    ->on( 'preCreate', function ( $editor, $values ) {
        $editor
            ->field( 'added_by' )
            ->setValue( $_SESSION['username'] );
    })
        ->debug(true)
   ->where( function ( $q ) {
    $q->where( 'cid',$_SESSION['update_cid']);
} )
    ->process( $_POST )
    ->json();

Datatables Globalization

$
0
0

I'm in the process of updating my sites to v2.0. Each site contains multiple instances of a dataTable. Is there a way to make some of the parameters global. For example most of the uses has the pagination at the top of the table with the type set to full_numbers. So is there a way to set set - top2: { paging: { type: 'full_numbers' } }, globally rather than including it in each instance.

Further, I would like to globalize the 'language: paginate:' options so that the First, Previous, Next, Last are text rather than icons.

TIA for any suggestions
jdadwilson

Export jalali date to excel in correct format

$
0
0

Hi. I have some column with jalali date like this : 1403-03-25. when I export it to excel format , the date columns shows like this #####. That cell have date format. when I convert it to general format in excel it turns to a negative number.My table fetches data in ajax mode.
How can I fix it. Or how can I make script export that cell as general format not date format.

AlphabetSearch unknown feature

$
0
0

Integral to each of my dataTables is the alphabetSearch feature. I added the following to the global extend defaults...

layout: { top1: 'alphabetSearch', top2: 'paging', bottom: 'info' },
Doing causes a unknown feature error. There is obviously something that I am not doing but I have no clue. I copied the code directly from the three part instructions.

For a test example use this URL: https://www.trgrayson.org/cemeteries-dt

For a live example using dataTable v1 just remove the -dt from the above url.

Thanks in advance for all your help.

jdadwilson

DT 2.0 : dt-type-numeric class to cells with FA icons

$
0
0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Hi,

I've just upgrade to datatable 2.0 (congratulations by the way !)

I'm wondering if it's normal that dt-type-numeric class is added to cells containing an icon <i></i> (font awesome).

Example :

<td class="dt-type-numeric"><i class="fa-solid fa-magnifying-glass" title="Fiche détaillée"></i></td>

<td class="dt-type-numeric"><a data-fancybox="formulaire" data-type="iframe" href="fb_ajouter_personne3cols.htm&tcom1=CM&tcom20=851"><i class="fa-solid fa-user-plus" title="Ajouter une personne"></i></a></td>

I've added a class in the column defs to change the text alignment in theses cases :

    { className: 'icone', targets: [0, 1, 10, 12] }

Also, I'm wondering where I can find the new features, I saw the mention « Since: DataTables 2.0.0 » on some pages of the documentation, try to click on it hoping to see the list (I'm a dreamer, I know...)

Congratulation again for the new version of datables :)

This request has been blocked because sensitive information could be disclosed to third party

$
0
0

I am certainly getting some technical issues on this build out of editor that I have never seen before.

Anyone see this one where GET is blocked?

I have a browser network response as follows;

This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.

Here is my controller

` public class AlternativeBillingController : Controller
{
[Route("AlternativeBilling/DataTransport")]
[AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]
public ActionResult DataTransport()
{
DefaultConnection1 dbConnection2 = new DefaultConnection1();

        //var request = HttpContext.Current.Request;
        var request = System.Web.HttpContext.Current.Request.Form;

        var settings = Properties.Settings.Default;


        using (var db = new Database(settings.DbType, settings.DbConnection))
        {

            var response = new Editor(db, "GR_AlternativeBilling", "TableID")
                .Model<GR_AlternativeBilling>()
                .Process(request)
                .Data();

            return Json(response);
        }
    }
}`

To tell JSON a GET is ok, When i change return Json(response); to return Json(response, JsonRequestBehavior.AllowGet);

I get this error.

! "draw": null,
"data": [],
"recordsTotal": null,
"recordsFiltered": null,
"error": "Method not found: \u0027System.String[] System.String.Split(Char, System.StringSplitOptions)\u0027.",
"fieldErrors": [],
"id": null,
"meta": {},
"options": {},
"searchBuilder": {
"options": {}
},
"searchPanes": {
"options": {}
},
"files": {},
"upload": {
"id": null
},
"debug": null,
"cancelled": []


FixedHeader not working

$
0
0

Hi guys,

I'm trying to get the FixedHeader to work, but it's not working for me. I included the files via the CDN link and they are included in the page source. There are no errors shown in the console.

The DataTable instance is created with:

        table = jQuery('#task-and-po-table').DataTable({
            fixedHeader: true,
            paging: true,

This is a table that has been in use for several years and works fine. I thought perhaps it was because I am using:

tfoot {
    display: table-header-group!important;
}

in the CSS to move the filter up to the header, but removing that made no difference.

This table has an inline editor, but I tried it on another table that does not and it also did not work. When I scroll the page with the table, the header scrolls up past the browser's top and past it so it is no longer visible.

Is there something else I need to do to make this work?

Best regards,
Arnor

Editor Child Table - two error messages

$
0
0

Last week I did my first editor child table in an existing project using instructions found here;
https://datatables.net/blog/2019/parent-child-editing-in-child-rows#DataTable-configuration

It went flawlessly.

Today I am attempting to put a child table in a NEW editor project and am getting two error messages.

For the purpose of building up a quick test, the child table is an exact clone of the main table (child TABLE ONLY, No editing is desired for this test). Ill incorporate editor on the child table on a later test.

Here are the error messages I am getting;

Here is my cshtml, its almost stock editor-generator ( I have no idea why the code formatting is not behaving on this post, sorry guys )

@{
    ViewBag.Title = "AlternativeBilling";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!doctype html>
<style>

    .DTE_Field_Input {
            color: #ff6a00;
    }
</style>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <title>DataTables Editor - GR_AlternativeBilling</title>

    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jq-3.7.0/moment-2.29.4/jszip-3.10.1/dt-2.0.8/af-2.7.0/b-3.0.2/b-colvis-3.0.2/b-html5-3.0.2/b-print-3.0.2/cr-2.0.3/date-1.5.2/fh-4.0.1/kt-2.12.1/r-3.0.2/rr-1.5.0/sc-2.4.3/sp-2.3.1/sl-2.0.3/datatables.min.css">
    <link href="~/Content/DataTable/generator-base.css" rel="stylesheet" />
    <link href="~/Content/DataTable/editor.dataTables.min.css" rel="stylesheet" />

    <script type="text/javascript" charset="utf-8" src="https://cdn.datatables.net/v/dt/jq-3.7.0/moment-2.29.4/jszip-3.10.1/dt-2.0.8/af-2.7.0/b-3.0.2/b-colvis-3.0.2/b-html5-3.0.2/b-print-3.0.2/cr-2.0.3/date-1.5.2/fh-4.0.1/kt-2.12.1/r-3.0.2/rr-1.5.0/sc-2.4.3/sp-2.3.1/sl-2.0.3/datatables.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
    <script type="text/javascript" charset="utf-8" src="~/Scripts/DataTable/dataTables.editor.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="~/Scripts/DataTable/table.GR_AlternativeBilling.js"></script>

</head>
<body class="dataTables">
    <div class="container">

        <h1>
            DataTables Editor <span>GR_AlternativeBilling</span>
        </h1>

        <table cellpadding="0" cellspacing="0" border="0" class="display" id="GR_AlternativeBilling" width="100%">
            <thead>
                <tr>
                    <th>Patient</th>
                    <th>Insurance</th>
                    <th>Employer</th>
                    <th>ContactName</th>
                    <th>ContactPhone</th>
                    <th>ContactEmail</th>
                    <th>Method</th>
                    <th>NumberOfVisits</th>
                    <th></th>
                </tr>
            </thead>
        </table>

    </div>
</body>
</html>`

and here is my js also pretty much stock editor-generator

/*
 * Editor client script for DB table GR_AlternativeBilling
 * Created by http://editor.datatables.net/generator
 */

addEventListener("DOMContentLoaded", function () {
    var editor = new DataTable.Editor( {
        ajax: '/AlternativeBilling/DataTransport',
        table: '#GR_AlternativeBilling',
        fields: [
            {
                "label": "Patient :",
                "name": "PatientName"
            },
            {
                "label": "Insurance:",
                "name": "Insurance"
            },
            {
                "label": "Employer:",
                "name": "Employer"
            },
            {
                "label": "ContactName:",
                "name": "ContactName"
            },
            {
                "label": "ContactPhone:",
                "name": "ContactPhone"
            },
            {
                "label": "ContactEmail:",
                "name": "ContactEmail"
            },
            {
                "label": "Method:",
                "name": "Method"
            },
            {
                "label": "NumberOfVisits:",
                "name": "NumberOfVisits"
            }
        ]
    } );

    var mainTable = new DataTable('#GR_AlternativeBilling', {
        ajax: '/AlternativeBilling/DataTransport',
        columns: [

            {
                "data": "PatientName"
            },
            {
                "data": "Insurance"
            },
            {
                "data": "Employer"
            },
            {
                "data": "ContactName"
            },
            {
                "data": "ContactPhone"
            },
            {
                "data": "ContactEmail"
            },
            {
                "data": "Method"
            },
            {
                "data": "NumberOfVisits"
            },
            {
                className: 'details-control dt-control',
                orderable: false,
                data: null,
                defaultContent: '',
                width: '10%'
            },
        ],
        layout: {
            topStart: {
                buttons: [
                    { extend: 'create', editor: editor },
                    { extend: 'edit', editor: editor },
                    { extend: 'remove', editor: editor }
                ]
            }
        },

        select: true,
        processing: true,
    });
    // Activate an inline edit on click of a table cell
    mainTable.on('click', 'tbody td:not(:first-child)', function (e) {
        editor.inline(this);
    });


    $('#GR_AlternativeBilling tbody').on('click', 'td.details-control', function () {


        var tr = $(this).closest('tr');
        var row = mainTable.row(tr);

        if (row.child.isShown()) {
            // This row is already open - close it
            destroyChild(row);
            tr.removeClass('shown');
        }
        else {
            // Open this row
            //format(row.data());
            createChild(row, row.data());
            tr.addClass('shown');
        }

    });
    function createChild(row, data) {

        // This is the table we'll convert into a DataTable
        var table = $('<table class="display childGrid" width="100%"/>');

        // Display it the child row
        row.child(table).show();

        // Initialise as a DataTable
        var childTable = table.DataTable({
            ajax: '/AlternativeBilling/DataTransport',
            columns: [

                {
                    "data": "PatientName"
                },
                {
                    "data": "Insurance"
                },
                {
                    "data": "Employer"
                },
                {
                    "data": "ContactName"
                },
                {
                    "data": "ContactPhone"
                },
                {
                    "data": "ContactEmail"
                },
                {
                    "data": "Method"
                },
                {
                    "data": "NumberOfVisits"
                },
                {
                    className: 'details-control dt-control',
                    orderable: false,
                    data: null,
                    defaultContent: '',
                    width: '10%'
                },
            ],
            layout: {
                topStart: {
                    buttons: [
                        { extend: 'create', editor: editor },
                        { extend: 'edit', editor: editor },
                        { extend: 'remove', editor: editor }
                    ]
                }
            },

            select: true,
            processing: true,
        });


    }

    function destroyChild(row) {
        var table = $("table", row.child());
        table.detach();
        table.DataTable().destroy();

        // And then hide the row
        row.child.hide();
    }

});

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Because each row of my table input has sub items, similar to the table below, is there any example?

$
0
0

Because each row of my table input has sub items, similar to the table below, is there any example related to this that I can refer to?

Link to test case:

Debugger code (debug.datatables.net):

Error messages shown:
Description of problem:

Datatables V2.0 table().row().node() behavior change from v1.10?

$
0
0

I have been trying to move to Datatables v2, and I seem to have come across another hiccup. And it most likely is something I am overlooking in the change docs, but I do not know.

In version 1.10, I could:

var table = $j('#t'_Table').DataTable();
var row = table.row('#row_'+d.data.ID);
var node = row.node();

$j(node).find('.cssCompTot').addClass('sqsCompSelf');

And it would find all the cells (<td></td>) with that class and add the additional class.

Now, in v2, it does not work that way. And not matter what I have tried (been through every google post I could find) it will not add the class. And when I console.log() the length is 0.

What has changed and how do I fix it?

I want a modal to show when id is clicked

$
0
0

Link to test case: https://live.datatables.net/piwahija/1/edit?html,css,js,console,output
Debugger code (debug.datatables.net):
Error messages shown: no modals is showing
Description of problem:I apologize for the basic question as I'm new to DataTables. I'm looking to implement modals for expanded columns or details. Specifically, I have columns for AR#, AR TYPE, DATE APPLIED, REASON, OT TYPE & HOURS, DATE DURATION, TIME PERIOD, and SHIFT SCHEDULE. When I click on a modal, I want it to display the First Name, Last Name, and Statuses. Could you please help me with this?

access the columns array from API ?

$
0
0

I'm talking about the columns array that I define in the options.data.columns or the one I get in the ajax callback in data.columns. Where do I get it from the table object?

Datatables not working - yes, again, another Newbie!

$
0
0
        import { Client, MimsFinancialGuarantee, MimsFinancialGuaranteeList } from "./client-api";
        import {inject} from "aurelia-framework";
        import {EventAggregator} from "aurelia-event-aggregator"
        import DataTable from "datatables.net";

        @inject (Client, EventAggregator, DataTable)
        export class FinancialGuarantee{
            mimsFinancialGuaranteeList:MimsFinancialGuaranteeList[];
            selectedFG="";

            constructor (private client:Client, private ea: EventAggregator ){
            };

            created(){
                this.client.mimsFinancialGuaranteeListAll().then( mimsFinancialGuaranteeList => this.mimsFinancialGuaranteeList = mimsFinancialGuaranteeList);
                new DataTable('#FGTable', {
                    data: this.mimsFinancialGuaranteeList,
                    columns:[
                        { data: 'controlNo'},
                        { data: 'requestedBy' },
                        { data: 'fgDmcName' },
                        { data: 'LmbName' },
                        { data: 'roadList' },
                        { data: 'projectTypeDescr' },
                    ]}
                );
            }
            select(MimsFinancialGuarantee){
                this.selectedFG = MimsFinancialGuarantee.controlNo; 
                return true;
            }
        }

    AURELIA HTML TEMPLATE:
   <template>
        <div>
        <div class="contact">
            <table class="table table-striped" id="FGTable" >
                <thead>
                    <tr>
                        <th>Control No</th>
                        <th>RequestedBy</th>
                        <th>DMC Name</th>
                        <th>LMB Name</th>
                        <th>Roads List</th>
                        <th>Project Type Descr</th>
                    </tr>
                    <tbody>
                        <tr repeat.for = "mimsFinancialGuarantee of mimsFinancialGuaranteeList"
                        class="list-group-item list-group-item-action ${mimsFinancialGuarantee.id === parent.selectedId? 'active': ''}"
                        >
                            <td>${mimsFinancialGuarantee.controlNo} </td>
                            <td>${mimsFinancialGuarantee.requestedBy}</td>
                            <td>${mimsFinancialGuarantee.fgDmcName}</td>
                            <td>${mimsFinancialGuarantee.LmbName}</td>
                            <td>${mimsFinancialGuarantee.roadList}</td>
                            <td>${mimsFinancialGuarantee.projectTypeDescr}</td>
                        </tr>
                    </tbody>
                </thead>
            </table>
        </div>
    </div>
    </template> 

Debugger code (debug.datatables.net): ???? How do I use this?
Error messages shown: None!
Description of problem:
I am a newbie trying to use the datatables in Aurelia ( also new to me ). The table body part of the html in the Aurelia template works perfectly fine. Data gets fetched and display as expected. I know this is not used in the Datatables function.
However, the Datatable just does absolutely nothing! It worked earlier in the day - and I must have changed something simple - and now there's just nothing - no error messages in Chrome console, no warnings, nada, zippo!
Please help. Thanks.


header checkbox select

$
0
0

Hi, I would like to disable the checkbox to select all records in the header, the example on the site doesn't work. Does anyone know how to do?
Thank you

isTrigger error - seemingly caused when SORTING

$
0
0

Link to test case: Unfortunately I cannot link to a test case, and the issue seems intermittent and the tables are in a secure portion of the site.

Debugger code (debug.datatables.net): The issue doesn't seem to pop a Datatables error. It results in an error sent to Sentry.

Error messages shown:
On Sentry, the error looks like this:
Object captured as exception with keys: isTrigger, jQuery3700892121091154535

Description of problem:
I'm using the DataTables plugin and encountering errors in production. I suspect it's related to sorting, since the requested URL includes these parameters:

• filters[fiscal_year]=2024
• filters[month]=04
• filters[sales_doc_type]=month_summary
• ... (other filter parameters)
• draw=3
• columns[0][data]=placeholder
• columns[0][name]=placeholder
• ... (other column definitions)
• order[0][column]=3
• order[0][dir]=asc
• start=0
• length=50
• search[value]=
• search[regex]=false
• _=1719849866708

While sorting usually doesn't cause errors, it makes testing difficult in this case.

I've encountered two types of errors:

{"isDefaultPrevented":"[Function: returnTrue]","isTrigger":3,"jQuery37008835334434631363":true,"namespace":"dt","result":false,"rnamespace":{},"target":"[HTMLElement: HTMLTableElement]","timeStamp":1719826898448,"type":"error"}

and

{"isTrigger":3,"jQuery37008835334434631363":true,"namespace":"dt","rnamespace":{},"target":"[HTMLElement: HTMLTableElement]","timeStamp":1719826898448,"type":"error"}

There's a similar unresolved issue on the DataTables forum: https://datatables.net/forums/discussion/57125/i-would-like-to-know-the-cause-of-this-error-i-could-not-find-the-solution

Could the issue be related to extremely long ajax requests? We send a lot of data via ajax to be handled by datatables.

Thanks!

set initial search on specific column(s)

$
0
0

Is there a way to set an initial search option, but specific to a column? The search option applies a global search. I'm looking for the same thing but specific to a column.

Using SearchBuilder by SSP in Laravel 10

$
0
0

`$(document).ready( function () {
$('#datatable').DataTable({

    buttons: [
        {
            extend: 'collection',
            text: 'Export',
            buttons: [
                'copyHtml5',
                'excelHtml5',
                'csvHtml5',
                'pdfHtml5'
            ]
        }
    ],
    dom: 'QBfrtip', //important
    processing: true,
    serverSide: true,
    ajax: {
        url: '/api/web/items',
    },
    columns: [
        { "data": "id", "visible": true },
        { "data": "name" },
        { 
            "data": "description",
            "sortable": false
         },
        {
            data: 'vendor',
            render: function(data, type, row) {
                return data.name;
            },
            "sortable": false
        },            
        { "data": "price" },
        { "data": "category_id", "visible": false },
        { "data": "material_id", "visible": false},
        { "data": "unit_id", "visible": false}
   ]
});
$('.dt-buttons .btn').removeClass('dt-button');

});`

Hi,
I am using SSP in the DataTable, but I am not able to function the conditions in the Search Builder. I went through most of the documentation, I was not able to fix it, please can anyone help me.

I added a Datatable field to one of my Editors but it's not working as expected.

$
0
0

The Datable field appears on the Editor but I'm not sure how to populate it with data. The Datagrid that the Editor references has a one to many relationship to the data that I want to appear in the Datable field on the Editor. Each record in the Datagrid contains an Id that is a foreign key to the Actions table which can contain multiple records for each record in the Datagrid. The records in the Actions Datable are read-only the user will never have to edit them. I apologize I'm still pretty new to using these controls but trying to understand how to do this.

Viewing all 82534 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>