Modal show when dataTable row is clicked.

Modal show when dataTable row is clicked.

faridmcdatofaridmcdato Posts: 1Questions: 1Answers: 0

Good day guys,

I would like to ask how to make the modal pop up when a row in the dataTable was double clicked? After that the data of the clicked row will be received by the modal where one of the data is editable and other data are non-editable.

Please guide me how to do this specific problem. Sorry for being beginner and I`ll gratitude your kind help.

Thanks

Answers

  • senkusenku Posts: 3Questions: 0Answers: 0

    var oTable = $('#example'). dataTable();
    $('#example').on('click', 'tr', function(){
    var oData = oTable.fnGetData(this);
    console.log(oData);
    });

  • senkusenku Posts: 3Questions: 0Answers: 0

    or you can also chang rows

    $('#example').on('click', 'tr', function(){
    var oTable = $('#example'). dataTable();
    var oData = oTable.fnGetData(this);
    console.log(oData);
    });

  • senkusenku Posts: 3Questions: 0Answers: 0

    use oData in Ajax for make request

This discussion has been closed.