DataTables Edit - Uncaught Unable to find row identifier For more information

DataTables Edit - Uncaught Unable to find row identifier For more information

ajay.patel2ajay.patel2 Posts: 3Questions: 1Answers: 1

Hi allan,

I am getting this error while using the datatables editor plugin.

Uncaught Unable to find row identifier For more information, please refer to https://datatables.net/tn/14

I have read the information on https://datatables.net/tn/14. Also added the "DT_RowId" on each row for unique identification and also added the js option idSrc: 'id'.

Any idea why still I am getting this error.

Thanks in advance !

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,830Questions: 1Answers: 10,131 Site admin

    Can you show me both your DataTables and Editor configurations please? Could you also show me a sample of the data you are using to populate the table?

    Thanks,
    Allan

  • ajay.patel2ajay.patel2 Posts: 3Questions: 1Answers: 1
    edited August 2016

    Hey Allan,

    Thanks for response, that was resolve.
    Issue was I was passing the Wrong ID in my case it should be idSrc: 'StageID'.

    But now I have few query, while click on cell I got that editor textbox but I am also getting the label name also I don't want to show it.

    And second is "LastUpdatedDate" has type: "datetime", but its not opening date picker. Am I missing any dependency for that ?

    editor = new $.fn.dataTable.Editor( {
                        ajax: "../php/staff.php",
                        table: "#sm-type-customer-table .dataTables_scrollBody table",
                        idSrc:  'StageID',
                        fields: [ 
                             {
                                label: "Stage ID:",
                                name: "StageID"
                            }, {
                                label: "Stage Name:",
                                name: "StageName"
                            }, {
                                label: "Stage Desc:",
                                name: "StageDesc"
                            }, {
                                label: "Active:",
                                name: "Active",
                                type: "select",
                                options: [
                                    { label: "Yes", value: "yes" },
                                    { label: "No",           value: "no" },
                                ]
                            }, {
                                label: "Mapped CCount:",
                                name: "MappedCCount",
                                
                            }, {
                                label: "Last Updated Date:",
                                name: "LastUpdatedDate",
                                type: "datetime",
                                def:   function () { return new Date(); }
                            }
                        ]
                    } );
    

    Thanks in advance !
    Allan

  • allanallan Posts: 61,830Questions: 1Answers: 10,131 Site admin

    Can you link to the page so I can debug it please? There are no external dependencies for the datetime field type.

    Allan

  • ajay.patel2ajay.patel2 Posts: 3Questions: 1Answers: 1
    Answer ✓

    Hi allan,

    Sorry for the late replay, there was the issue with ID only.
    Its fixed now.

    Thanks

This discussion has been closed.