title: Row Grouping in datatables not working
body: <p>I have been trying to follow this approach of row grouping described in the following link.  <a href="http://www.datatables.net/examples/advanced_init/row_grouping.html" rel="nofollow">http://www.datatables.net/examples/advanced_init/row_grouping.html</a></p>
  
  <p>However while implementing the drawCallback function I had to change the name to "fnDrawCallback" for my datatable to recognize this function and also declare var api as   var api = this.oApi._fnGetTrNodes( settings );  instead of the way described in the example (var api = this.api();) as otherwise I was getting an error. However now I am still getting a similar error while defining the rest of function if I follow the syntax and keywords given in the example. That is , </p>
  
  <pre><code>var rows = api.rows( {page:'current'} ).nodes();
              var last=null;
               api.column(2, {page:'current'} ).data().each( function ( group, i ) {
                  if ( last !== group ) {
                      $(rows).eq( i ).before(
                          '&lt;tr class="group"&gt;&lt;td colspan="5"&gt;'+group+'&lt;/td&gt;&lt;/tr&gt;'
                      );
  </code></pre>
  
  <p>The error I get is "undefined is not a function " for the drawCallback function. I tried a lot trying to find a different way of writing the same function but I cannot understand why this doesn't work and why I had to change the api declaration too. </p>
  
  <p>I am very new to this , so if someone could explain what the correct format would be to write this function without this error I would really appreciate it ! </p>
  
  <p>Please find my Jquery part listed below. Thanks in advance !!</p>
  
  <pre><code>$(document).ready(function(){
      var oTable = $("#tableTenants").dataTable({
          "bProcessing": true,
  
          "sAjaxSource": "/api/alltenantstatistic.json?iDisplayStart=0&amp;iDisplayLength=${totalCount}&amp;sSortDir_0=asc",
          "aoColumns": [
  
                        { "mDataProp": "state","sClass": "student_rows" , "sWidth":"1%" },
                        { "mDataProp": "name","sClass": "student_rows" , "sWidth":"20%"},
                        { "mDataProp": "testAdmin","sClass": "student_rows" , "sWidth":"70%"},
                        { "mDataProp": "totalStudentCount","sClass": "select_rows" , "sWidth":"2%", "bSortable": false },
                        { "mDataProp": "totalPnPStudentCount","sClass": "select_rows" , "sWidth":"2%", "bSortable": false }
                       ],
  
          "aoColumnDefs": [
                          {   "fnRender": function(oObj) {
                                    return '&lt;a href="#"&gt;' + oObj.aData.state + '&lt;/a&gt;';
  
                                   },
                              "bUseRendered": false,
                              "aTargets": [0]
                           },
                          {   
                              "aTargets": [1],
                               "bVisible": false
                          },
                              ],                  
                          "iDisplayLength": 10,
                          "order": [[ 1, 'asc' ]],
                           "fnDrawCallback": function ( settings ) {
                               console.log("hello");
                               var api = this.oApi._fnGetTrNodes( settings ); // Had to change this from this.api();
                               var rows = api.rows({page:'current'}).nodes(); // Giving an error 
                                                           var last=null;
                                                            api.column(1, {page:'current'} ).data().each( function ( group, i ) {
                                                            if ( last !== group ) {
                                                                    $(rows).eq( i ).before(
                                                                       '&lt;tr class="group"&gt;&lt;td colspan="4"&gt;'+group+'&lt;/td&gt;&lt;/tr&gt;'
                                                             );
  
                      last = group;
                  }
              } );
  
                           }, 
                          "bLengthChange": true,
                          "bFilter": true,
                          "bAutoWidth": false,
                          //"bStateSave": true,
                          "sDom": "&lt;'row-fluid'&lt;'span5'l&gt;&lt;'span7'f&gt;&lt;'span2'&gt;r&gt;t&lt;'row-fluid'&lt;'span6'i&gt;&lt;'span6'p&gt;&gt;",
  
                          "sPaginationType":  "bootstrap",
                          "oLanguage": {
                              "sLengthMenu": "_MENU_",
                              "sEmptyTable": "No Organization Uploads available for this Tenant",
                              "sInfoEmpty": "",
                              "sProcessing": "Loading..."
                          }
      });
  </code></pre>