How to use rowspan and colspan with datatable, if table data is dynamic and it may be upto two dimenstions?HTML Table to PHP array with atributes colspan and rowspanHow to change colspan and rowspan dynamically without causing harm to table structureDynamically loading data to a table and using datatable to paginateCannot reinitialise DataTable - dynamic data for datatableDynamic rowspan table in PHPDynamic Table with rowspanHow to allow colspan and rowspan for export excel in datatable jquery pluginHow to use Rowspan in datatableHow to append data, when colspan applied by datatable when no data available as a result from jquery datatableJavascript Datatable dynamic data

How to prevent criminal gangs from making/buying guns?

What would cause a nuclear power plant to break down after 2000 years, but not sooner?

Trying to understand how Digital Certificates and CA are indeed secure

Adjective or adverb before another adjective

Vegetarian dishes on Russian trains (European part)

Unconventional examples of mathematical modelling

If it isn't [someone's name]!

Yes/ No : The sum of two ideals of a ring R is an ideal of R

A reccomended structured approach to self studying music theory for songwriting

What if a restaurant suddenly cannot accept credit cards, and the customer has no cash?

How can I change the movement to Linear?

Are unaudited server logs admissible in a court of law?

Why is the battery jumpered to a resistor in this schematic?

Would getting a natural 20 with a penalty still count as a critical hit?

What are the advantages of this gold finger shape?

Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?

Has there ever been a truly bilingual country prior to the contemporary period?

Meaning and structure of headline "Hair it is: A List of ..."

How should you gracefully leave a company you helped start?

Have made several mistakes during the course of my PhD. Can't help but feel resentment. Can I get some advice about how to move forward?

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

Why should I pay for an SSL certificate?

Why don't modern jet engines use forced exhaust mixing?

Build a mob of suspiciously happy lenny faces ( ͡° ͜ʖ ͡°)



How to use rowspan and colspan with datatable, if table data is dynamic and it may be upto two dimenstions?


HTML Table to PHP array with atributes colspan and rowspanHow to change colspan and rowspan dynamically without causing harm to table structureDynamically loading data to a table and using datatable to paginateCannot reinitialise DataTable - dynamic data for datatableDynamic rowspan table in PHPDynamic Table with rowspanHow to allow colspan and rowspan for export excel in datatable jquery pluginHow to use Rowspan in datatableHow to append data, when colspan applied by datatable when no data available as a result from jquery datatableJavascript Datatable dynamic data






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








5















I am using datatable in laravel project. Need to fetch records from database and it may be upto two dimestions. How can I use rowspan or colspan to make records category group with pagination and pageLength features ?



This project working on laravel framework 5.5. php >=7.0 version and MySQL 5.0.



I've also tried rowGroup of datatable. But it have some limitations like:



  • Currently only a single data point can be used for grouping at a time - there is no support for nested grouping


  • No option to expand / collapse a group


  • No support for the export options of the Buttons extension - the grouping information is just ignored.




var table = $('#report-employee-table').DataTable(
pageLength: 20,
processing: true,
serverSide: true,
bLengthChange: false,
dom: 'Blfrtip',
buttons: [
extend: 'excelHtml5',
"text": '<span class="glyphicons glyphicons-file_export"></span> &nbsp; Export',
"title": 'Employee Report',
"message": 'Employee Name: ' + $('#employee_id option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
"filename": 'employee-report',
header: true,
footer: true,
exportOptions:
modifier:
selected: true

,
customize: function (xlsx)
var sheet = xlsx.xl.worksheets['sheet1.xml'];
// s = for styling and 5 will make it left align with grey background
$('row:first c', sheet).attr('s', '5');

,

extend: 'print',
"text": '<span class="fa fa-print"></span> &nbsp; Print',
"title": 'Employee Report',
"message": 'Employee Name: ' + $('#employee_name option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
"filename": 'employee-report',
header: true,
footer: true,
exportOptions:
modifier:
selected: true



],
ajax:
url: "/*URL of controller where function return data in json format*/",
data: function (d)
d.employee_name = $('#employee_name').val();
d.report_date = $('#report_date').val();

,
columns: [
//data: 'DT_Row_Index', name: 'DT_Row_Index',

data: 'project_name',
name: 'project_name'
,

data: 'work_type_name',
name: 'work_type_name'
,

data: 'total_hour',
name: 'total_hour'
,
],
rowsGroup: ['project_name:name', 0],
footerCallback: function (row, data, start, end, display)
var api = this.api();

var aCol = api.column(2);

var foo = aCol.data(); //is empty!

$(aCol.footer()).html(

);
,
);









share|improve this question
































    5















    I am using datatable in laravel project. Need to fetch records from database and it may be upto two dimestions. How can I use rowspan or colspan to make records category group with pagination and pageLength features ?



    This project working on laravel framework 5.5. php >=7.0 version and MySQL 5.0.



    I've also tried rowGroup of datatable. But it have some limitations like:



    • Currently only a single data point can be used for grouping at a time - there is no support for nested grouping


    • No option to expand / collapse a group


    • No support for the export options of the Buttons extension - the grouping information is just ignored.




    var table = $('#report-employee-table').DataTable(
    pageLength: 20,
    processing: true,
    serverSide: true,
    bLengthChange: false,
    dom: 'Blfrtip',
    buttons: [
    extend: 'excelHtml5',
    "text": '<span class="glyphicons glyphicons-file_export"></span> &nbsp; Export',
    "title": 'Employee Report',
    "message": 'Employee Name: ' + $('#employee_id option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
    "filename": 'employee-report',
    header: true,
    footer: true,
    exportOptions:
    modifier:
    selected: true

    ,
    customize: function (xlsx)
    var sheet = xlsx.xl.worksheets['sheet1.xml'];
    // s = for styling and 5 will make it left align with grey background
    $('row:first c', sheet).attr('s', '5');

    ,

    extend: 'print',
    "text": '<span class="fa fa-print"></span> &nbsp; Print',
    "title": 'Employee Report',
    "message": 'Employee Name: ' + $('#employee_name option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
    "filename": 'employee-report',
    header: true,
    footer: true,
    exportOptions:
    modifier:
    selected: true



    ],
    ajax:
    url: "/*URL of controller where function return data in json format*/",
    data: function (d)
    d.employee_name = $('#employee_name').val();
    d.report_date = $('#report_date').val();

    ,
    columns: [
    //data: 'DT_Row_Index', name: 'DT_Row_Index',

    data: 'project_name',
    name: 'project_name'
    ,

    data: 'work_type_name',
    name: 'work_type_name'
    ,

    data: 'total_hour',
    name: 'total_hour'
    ,
    ],
    rowsGroup: ['project_name:name', 0],
    footerCallback: function (row, data, start, end, display)
    var api = this.api();

    var aCol = api.column(2);

    var foo = aCol.data(); //is empty!

    $(aCol.footer()).html(

    );
    ,
    );









    share|improve this question




























      5












      5








      5








      I am using datatable in laravel project. Need to fetch records from database and it may be upto two dimestions. How can I use rowspan or colspan to make records category group with pagination and pageLength features ?



      This project working on laravel framework 5.5. php >=7.0 version and MySQL 5.0.



      I've also tried rowGroup of datatable. But it have some limitations like:



      • Currently only a single data point can be used for grouping at a time - there is no support for nested grouping


      • No option to expand / collapse a group


      • No support for the export options of the Buttons extension - the grouping information is just ignored.




      var table = $('#report-employee-table').DataTable(
      pageLength: 20,
      processing: true,
      serverSide: true,
      bLengthChange: false,
      dom: 'Blfrtip',
      buttons: [
      extend: 'excelHtml5',
      "text": '<span class="glyphicons glyphicons-file_export"></span> &nbsp; Export',
      "title": 'Employee Report',
      "message": 'Employee Name: ' + $('#employee_id option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
      "filename": 'employee-report',
      header: true,
      footer: true,
      exportOptions:
      modifier:
      selected: true

      ,
      customize: function (xlsx)
      var sheet = xlsx.xl.worksheets['sheet1.xml'];
      // s = for styling and 5 will make it left align with grey background
      $('row:first c', sheet).attr('s', '5');

      ,

      extend: 'print',
      "text": '<span class="fa fa-print"></span> &nbsp; Print',
      "title": 'Employee Report',
      "message": 'Employee Name: ' + $('#employee_name option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
      "filename": 'employee-report',
      header: true,
      footer: true,
      exportOptions:
      modifier:
      selected: true



      ],
      ajax:
      url: "/*URL of controller where function return data in json format*/",
      data: function (d)
      d.employee_name = $('#employee_name').val();
      d.report_date = $('#report_date').val();

      ,
      columns: [
      //data: 'DT_Row_Index', name: 'DT_Row_Index',

      data: 'project_name',
      name: 'project_name'
      ,

      data: 'work_type_name',
      name: 'work_type_name'
      ,

      data: 'total_hour',
      name: 'total_hour'
      ,
      ],
      rowsGroup: ['project_name:name', 0],
      footerCallback: function (row, data, start, end, display)
      var api = this.api();

      var aCol = api.column(2);

      var foo = aCol.data(); //is empty!

      $(aCol.footer()).html(

      );
      ,
      );









      share|improve this question
















      I am using datatable in laravel project. Need to fetch records from database and it may be upto two dimestions. How can I use rowspan or colspan to make records category group with pagination and pageLength features ?



      This project working on laravel framework 5.5. php >=7.0 version and MySQL 5.0.



      I've also tried rowGroup of datatable. But it have some limitations like:



      • Currently only a single data point can be used for grouping at a time - there is no support for nested grouping


      • No option to expand / collapse a group


      • No support for the export options of the Buttons extension - the grouping information is just ignored.




      var table = $('#report-employee-table').DataTable(
      pageLength: 20,
      processing: true,
      serverSide: true,
      bLengthChange: false,
      dom: 'Blfrtip',
      buttons: [
      extend: 'excelHtml5',
      "text": '<span class="glyphicons glyphicons-file_export"></span> &nbsp; Export',
      "title": 'Employee Report',
      "message": 'Employee Name: ' + $('#employee_id option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
      "filename": 'employee-report',
      header: true,
      footer: true,
      exportOptions:
      modifier:
      selected: true

      ,
      customize: function (xlsx)
      var sheet = xlsx.xl.worksheets['sheet1.xml'];
      // s = for styling and 5 will make it left align with grey background
      $('row:first c', sheet).attr('s', '5');

      ,

      extend: 'print',
      "text": '<span class="fa fa-print"></span> &nbsp; Print',
      "title": 'Employee Report',
      "message": 'Employee Name: ' + $('#employee_name option:selected').text() + ' Work Duration: ' + $('#report_date').val(),
      "filename": 'employee-report',
      header: true,
      footer: true,
      exportOptions:
      modifier:
      selected: true



      ],
      ajax:
      url: "/*URL of controller where function return data in json format*/",
      data: function (d)
      d.employee_name = $('#employee_name').val();
      d.report_date = $('#report_date').val();

      ,
      columns: [
      //data: 'DT_Row_Index', name: 'DT_Row_Index',

      data: 'project_name',
      name: 'project_name'
      ,

      data: 'work_type_name',
      name: 'work_type_name'
      ,

      data: 'total_hour',
      name: 'total_hour'
      ,
      ],
      rowsGroup: ['project_name:name', 0],
      footerCallback: function (row, data, start, end, display)
      var api = this.api();

      var aCol = api.column(2);

      var foo = aCol.data(); //is empty!

      $(aCol.footer()).html(

      );
      ,
      );






      php laravel datatable






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 8 at 6:30









      rene

      34.8k12 gold badges85 silver badges117 bronze badges




      34.8k12 gold badges85 silver badges117 bronze badges










      asked Feb 14 at 4:34









      Bhuvanesh SoniBhuvanesh Soni

      1368 bronze badges




      1368 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54683273%2fhow-to-use-rowspan-and-colspan-with-datatable-if-table-data-is-dynamic-and-it-m%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54683273%2fhow-to-use-rowspan-and-colspan-with-datatable-if-table-data-is-dynamic-and-it-m%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현