sodri126 / jquery-datatables-row-grouping

Automatically exported from code.google.com/p/jquery-datatables-row-grouping
0 stars 0 forks source link

Setting bHideGroupingColumn to true hides group rows too!!! #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I am using datatables 1.9.3 jquery-datatables-row-grouping 1.2.7
2. I am using server-side json to fill data via objects (not arrays), similar 
to 
http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/serverSideJSONP-o
bjects.html but with plain json
3. I am using coffeescript, rails 3.2.8 and mac os x 10.7 (Lion) safari

What is the expected output? What do you see instead?

I expect to see the new rows normally, but I have to set bHideGroupingColumn to 
false to see them. Either I see row and column or I dont see no row nor column.

What version of the product are you using? On what operating system?

Please provide any additional information below.

This is my coffescript for enabling datatables:

jQuery ->
    $('#payees').dataTable
        sDom: '<"H"ifr>t<"F"p>'
        sPaginationType: "full_numbers"
        bLengthChange: false
        iDisplayLength: 40
        bAutoWidth: false
        bJQueryUI: true
        aoColumnDefs: [
            { bSortable: false, aTargets: [ 11 ] },
            { sType: "alt-string", aTargets: [ 1 ] },
            { sClass: "center", aTargets: [ 0,2 ] },
            { sClass: "record_actions", aTargets: [ 11 ] }
        ]
        oLanguage: {
            sUrl: "/datatables_es.txt" if locale == "es"
        }
        bProcessing: true
        bServerSide: true
        sAjaxSource: $('#payees').data('source')
        aoColumns: [
            { mDataProp: "zid" },
            { mDataProp: "id_number" },
            { mDataProp: "active" },
            { mDataProp: "name" },
            { mDataProp: "type" },
            { mDataProp: "tin" },
            { mDataProp: "reference" },
            { mDataProp: "address" },
            { mDataProp: "payee_category" },
            { mDataProp: "phone" },
            { mDataProp: "email" },
            { mDataProp: "record_actions" }
        ]
        fnServerParams: (aoData) ->
            aoData.push(
                { "name": "scope", "value": $(document).getUrlParam("scope") },
                { "name": "id", "value": $(document).getUrlParam("id") }
            )
    .rowGrouping({
        iGroupingColumnIndex: 8,
        bHideGroupingColumn: false //setting to true, doesnt show the row either
    })

This is my response json:

{
"sEcho":2,
"iTotalRecords":61,
"iTotalDisplayRecords":61,
"aaData":[
{
 "DT_RowClass":"",
 "zid":"<a href=\"/settings/payees/41\">41</a>",
 "id_number":"",
 "active":"<span style=\"color: green;\"><i class=\"icon-ok\" alt=\"ok\"></i></span>",
 "name":"provider 20",
 "type":"Proveedores",
 "tin":"",
 "reference":"",
 "address":" ",
 "payee_category":"partner",
 "phone":"",
 "email":"",
 "record_actions":"<a href=\"/settings/payees/41\" title=\"Detalles\"><i class=\"icon-eye-open\"></i></a><a href=\"/settings/payees/41/edit\" title=\"Editar\"><i class=\"icon-edit\"></i></a><a href=\"/settings/payees/41?destroy=true\" data-confirm=\"\u00bfEst\u00e1 seguro de destruirlo?\" data-method=\"delete\" rel=\"nofollow\" title=\"Destruirlo\"><i class=\"icon-trash\"></i></a>"
},
{
 "DT_RowClass":"",
 "zid":"<a href=\"/settings/payees/42\">42</a>",
 "id_number":"",
 "active":"<span style=\"color: green;\"><i class=\"icon-ok\" alt=\"ok\"></i></span>",
 "name":"client/provider 1",
 "type":"Clientes/Proveedores",
 "tin":"",
 "reference":"",
 "address":" ",
 "payee_category":"",
 "phone":"",
 "email":"",
 "record_actions":"<a href=\"/settings/payees/42\" title=\"Detalles\"><i class=\"icon-eye-open\"></i></a><a href=\"/settings/payees/42/edit\" title=\"Editar\"><i class=\"icon-edit\"></i></a><a href=\"/settings/payees/42?destroy=true\" data-confirm=\"\u00bfEst\u00e1 seguro de destruirlo?\" data-method=\"delete\" rel=\"nofollow\" title=\"Destruirlo\"><i class=\"icon-trash\"></i></a>"
},
{
 "DT_RowClass":"",
 "zid":"<a href=\"/settings/payees/43\">43</a>",
 "id_number":"",
 "active":"<span style=\"color: green;\"><i class=\"icon-ok\" alt=\"ok\"></i></span>",
 "name":"client/provider 2",
 "type":"Clientes/Proveedores",
 "tin":"",
 "reference":"",
 "address":" ",
 "payee_category":"",
 "phone":"",
 "email":"",
 "record_actions":"<a href=\"/settings/payees/43\" title=\"Detalles\"><i class=\"icon-eye-open\"></i></a><a href=\"/settings/payees/43/edit\" title=\"Editar\"><i class=\"icon-edit\"></i></a><a href=\"/settings/payees/43?destroy=true\" data-confirm=\"\u00bfEst\u00e1 seguro de destruirlo?\" data-method=\"delete\" rel=\"nofollow\" title=\"Destruirlo\"><i class=\"icon-trash\"></i></a>"
}
]
}

Original issue reported on code.google.com by sar...@gmail.com on 30 Aug 2012 at 6:26

GoogleCodeExporter commented 9 years ago
I have a similar example rowGroups+array of objects data and the plug in breaks
any solution

Original comment by chu...@gmail.com on 15 Nov 2012 at 1:01