Missing rows when using rowGrouping
Missing rows when using rowGrouping
I'm getting unexpected results when trying to group a fairly easy query.
Here's a link and how to get to the section:
http://vfwtest.byethost7.com/
Log in as "johndoe@gmail.com" pw-"password"
On the login window at the bottom, click the "CSR" button
The second tab (Summary) is the culprit.
Here's my SQL ("table_id" is used as my <tr> row id and is not part of the result set):
SELECT
    C.table_id,
    CONCAT(T.letter,'. ',T.service_type,
        CASE
            WHEN T.description IS NOT NULL THEN CONCAT(': ',T.description)
            ELSE ''
        END) AS type,
    P.program,
    C.members,
    C.hours,
    C.mileage,
    C.exp_don,
    C.`desc`,
    DATE_FORMAT(C.entry_date,'%c/%d/%Y') AS entry_date,
    C.`status`
FROM csr C
INNER JOIN lt_csr_type T ON C.type_id = T.table_id
INNER JOIN lt_csr_programs P ON P.csr_type_id = T.table_id AND C.program_id = P.table_id
WHERE C.post_id = 109
ORDER BY T.letter ASC, P.sort ASC;
Here's a call to the php:
http://vfwtest.byethost7.com/php/csr_summary.php?user_id=1877
Here's a screenshot of the results:
https://drive.google.com/file/d/0B9q28uX1UUM1RHgtVFVyLXFFLUk/view?usp=sharing
And here's my initialization:
var oTable=$('#smt_csr_summary_tbl').dataTable({
    "sScrollY": "100%",
    "sScrollX": "100%",
    "sScrollXInner": "100%",
    "bPaginate": false,
    "bScrollCollapse": true,
    "aaSorting": [[1,'asc']],
    "aoColumnDefs":[
                    {sName:"type", aTargets:[0]},
                    {sName:"program",sWidth:"200px",aTargets:[1]},
                    {sName:"members",sWidth:"40px",aTargets:[2]},
                    {sName:"hours",sWidth:"40px",aTargets:[3]},
                    {sName:"mileage",sWidth:"40px",aTargets:[4]},
                    {sName:"exp_don",sWidth:"60px",aTargets:[5]},
                    {sName:"desc",sWidth:"100px",aTargets:[6]},
                    {sName:"entry_date",sWidth:"60px",aTargets:[7]},
                    {sName:"status",sWidth:"40px",aTargets:[8]}
                ]
        
            }).rowGrouping({
                bExpandableGrouping:true
            }).makeEditable({
                sAddDeleteToolbarSelector:'',
                sUpdateURL:$this.options.url,
                oUpdateParameters: { 
                    "action":"update"
                },
                fnOnEdited:function(status){       
                },
                placeholder:"",
            });
I've been fighting with this for a few hours now and can't seem to pin down the issue.
Thanks for any help.
This question has an accepted answers - jump to answer
Answers
I think I found the issue. Looks like my table isn't being generated correctly in my php file. Here's the table I get...
Access to the live site is nice, but what's not working?
Your tbody rows are badly formed.
Yep, just found that :-) I've corrected it and now it looks great. I've uploaded the php if you want to take another peek.
Now I get to add the second grouping (Program)