Okay
  Public Ticket #1313760
Modal window
Closed

Comments

  • luisjordan started the conversation

    I'm trying to capture row click event but I don't find anything in documentation. Would you please show me an example of that event?
    The reason what i need this event is to show in a modal window the information of all the colums of the row clicked, seen and unseen colums, and I don't find anything of that functionality in the documentation. Would you tell me if that functionality exist and where to find out?
    Thanks a lot.

  •  472
    Isidora replied

    Hi luisjordan,
    Thank you for your purchase.

    You can find row click event in the file 

    /wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js around line 1141

    /** * Select table row on click 
    * @param e 
    * @returns {boolean} 
    */
    var clickEvent = function (e) {
    ....
    

    We can see that you open two same tickets so please close one.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  • luisjordan replied

    Hi Milan.

    Thanks for your answer but I think I didn't explain our needs quite well.
    We need on a row click get all the data from the clicked row, seen and unseen columns. It's possible? How? Could you give us an example please?
    We try the code below from DataTables jQuery plugin but isn't working.
    var table = wpDataTables.table_1;
        wpDataTables.table_1.on('select',function(e,dt,type,indexes){
            if(type==='row'){
                var data = table.rows(indexes).data().pluck('id');
            }
        });
    ¿How can I get the columns value of a row when is clicked?

    Thanks a lot

  •  472
    Isidora replied

    Hi luisjordan,

    You can take a look at the example of that in file wpdatatables.js on line #957:

    var row = $(tableDescription.selector + ' tr.selected').get(0);
    var data = wpDataTables[tableDescription.tableId].fnGetData(row);
    

    data variable will be an array with values of all row columns values (visible and hidden).

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables