Jqgrid frozen column appear incorrect structure
Asked Answered
S

1

0

I'm use jqgrid 4.4.5

I have grid configuration like this :

$(document).ready(function () {
    $('#listROvertime')
        .jqGrid({           
            //url: 'http://localhost/bison/rovertime/listing',
            datatype: 'json',
            mtype: 'post',
            colNames: ["NIK","Nama","Divisi","Jam","Tarif","Total"],
            colModel: [
                {name:"rovertime_nik",index:"rovertime_nik",width:100,
                    frozen:true,
                    key:true,
                    searchoptions:{
                        sopt:["eq","ne","bw","bn","ew","en","cn","nc"]
                    }
                },
                {name:"rovertime_name",index:"rovertime_name",width:260,
                    frozen:true,
                    searchoptions:{
                        sopt:["eq","ne","bw","bn","ew","en","cn","nc"]
                    }
                },
                {name:"rovertime_div",index:"rovertime_div",width:120,
                    frozen:true,
                    search:false
                },
                {name:"rovertime_ocount",index:"rovertime_ocount",width:70,align:"right",
                    formatter:"currency",
                    formatoptions:{thousandsSeparator:","},
                    search:false,
                    sortable:false
                },
                {name:"rovertime_oprice",index:"rovertime_oprice",width:110,align:"right",
                    formatter:"currency",
                    formatoptions:{thousandsSeparator:","},
                    search:false,
                    sortable:false
                },
                {name:"rovertime_over",index:"rovertime_over",width:110,align:"right",
                    formatter:"currency",
                    formatoptions:{thousandsSeparator:","},
                    search:false,
                    sortable:false
                }
            ],
            autowidth: true,            
            caption: 'Laporan Lembur'
        }).jqGrid('setGroupHeaders', {
            useColSpanStyle: true,
            groupHeaders: [
                {startColumnName: 'rovertime_ocount', numberOfColumns: 3, titleText: '<center>Lembur</center>'}
            ]
        }).jqGrid('setFrozenColumns');
});

The result column structure what I expected is "NIK,Nama,Divisi,Jam,Tarif,Total,Lain - Lain,Insentif,Total,Potongan Lain - Lain, Total". When I set the frozen option to false at the colModel id "rovertime_div", the column structure appears correctly. Otherwise, when I set the frozen option to true, the column structure appears incorrect.

Here's a picture how the expected results.

UPDATE 1 : If I set useColSpanStyle: false to column structure appears correctly.

Simonesimoneau answered 13/5, 2013 at 11:23 Comment(9)
What exactly is your question ?Earache
The result column what I expected is "NIK,Nama,Divisi,Jam,Tarif,Total,Lain - Lain,Insentif,Total,Potongan Lain - Lain, Total".Simonesimoneau
If you have found the answer for your problem, then i think you should close this question by self answeringEarache
I haven't find the answer. I just describe where the issue come from. Did you try use my grid config code?Simonesimoneau
so you mean to say the column names are taken wrongly comparative to what you have mentioned ?Earache
Can u simulate the same on jsfiddle.netEarache
@dreamweiver: Yes, that is what i means. Here's the link of code at jsfiddleSimonesimoneau
can we have chat hereEarache
is this what you wanted ? jsfiddle.net/sKLWa/2, i have just changed the useColSpanStyle: false, from trueEarache
E
0

Just set sortable option in your jqgrid sortable: true,.

Here is the running example

Happy coding :)

Earache answered 14/5, 2013 at 12:17 Comment(2)
yes that is what i want. That is one of the bug I found in jqgrid. I will report to the forum. Many thanks for your help.Simonesimoneau
@zenixgrace:Well i discovered that many have reported it as error on different forums.you can try posting on jqgrid official site.Earache

© 2022 - 2024 — McMap. All rights reserved.