Examples needed - Button in rows with hover menu

Examples needed - Button in rows with hover menu

josecsojosecso Posts: 1Questions: 1Answers: 0
edited February 2017 in Free community support

Any Datatable examples of tables with a button(s) with a hover menu for options? I'm trying to implement this in a project of mine but cannot get this to work. when I take this code an paste it into a new html file with only the button (no table content) it works fine.

  //$.fn.dataTable.ext.errMode = 'throw';
 
   $(document).ready(function() {
     $('#tabemcurso').DataTable(
     {
         processing:true,
         dom:'lftBip',
         buttons: [
         'copy', 'excel', 'pdf'
     ],
         
         //select:true,
   
       pageLength:10,
       scrollY: "300",
       scrollX: "100%",
       "ajax": {
         "method":"POST",
         "url":"list.php"
       },
       "columns":[
       
         {"data":"Null",
             "defaultContent": '<div class="dropdown"><button onclick="btnFunction()" class="dropbtn">...</button><div id="mydrop" class="dropdown-content"><a href="#">Some Option</a></div></div>'},
         {"data":"Proj_ID"},
         {"data":"Proj_Nome"},
         {"data":"Cliente"},
                 ],
         
          AutoWidth:true,
          "fnCreatedRow": function( nRow, aData, iDataIndex ) {
           $(nRow).children("td").css("overflow", "hidden");
           $(nRow).children("td").css("white-space", "nowrap");
           $(nRow).children("td").css("text-overflow", "ellipsis");
           },
     });
   });
This discussion has been closed.