Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
cellEdit Keyboard Navigaion doesn't work
10/02/2012
10:23
Avatar
zenixgrace
Jakarta
Member
Members
Forum Posts: 41
Member Since:
10/05/2010
sp_UserOfflineSmall Offline

Hi All,

I'm not sure it's a bug or not

i use jqgrid 4.3.1 (last version)

i configure my grid using cellEdit option that is set true

when i use keyboard arrow key (up,left,down,right) it's not work

but when i use mouse click, it's work fine

here is my grid configuration

    /***** Absence Grid *****/
    var myGrid = $('#listTrAbsence').jqGrid({
        url: trabsence_site_url + '/listing',
        datatype: 'json',
        mtype: 'post',
        postData: {
            date: $('#txtDate').val(),
            div: $('#cboDivisi').val()
        },
        colNames: ['NIK','Name','Amount'],
        colModel: [
            {name:'trabsen_nik',index:'trabsen_nik',hidden:true},
            {name:'trabsen_name',index:'trabsen_name',width:645},
            {name:'trabsen_amount',index:'trabsen_amount',width:135,align:'right',
                formatter: 'integer',
                editable: true,
                editoptions: {align:'right'},
                searchoptions: {
                    dataInit: function(el) {
                        $(el)
                            .keypress(function(e) {
                                if (!checkNumber(e)) return false;
                            })
                            .blur(function() {
                                if ($(el).val() != '')
                                    if ($(el).val() <= 0)
                                        $(el).val(0);
                            })
                            .css('text-align', 'right');
                    }
                }
            }
        ],
        rowNum: 15,            
        rowList: [15,30,45,60],
        pager: jQuery('#pListTrAbsence'),
        sortname: 'trabsen_name',
        height: 330,
        viewrecords: true,
        sortorder: 'desc',
        cellEdit: true,
        editurl:  trabsence_site_url + '/update',
        caption: 'Absences List'
    });
    $('#listTrAbsence').jqGrid('navGrid','#pListTrAbsence',{edit:false,add:false,del:false,search:false});
    $('#listTrAbsence').jqGrid('navButtonAdd','#pListTrAbsence',{id:'toggle_listTrAbsence',caption:'Toggle',title:'Toggle Search Toolbar',buttonicon :'ui-icon-pin-s',
            onClickButton:function(){
                myGrid[0].toggleToolbar()
            }
    });
    $('#listTrAbsence').jqGrid('navButtonAdd','#pListTrAbsence',{id:'clear_listTrAbsence',caption:'Clear',title:'Clear Search',buttonicon :'ui-icon-radio-off',
            onClickButton:function(){
                myGrid[0].clearToolbar()
            }
    });
    $("#listTrAbsence").jqGrid('filterToolbar');

i look from the demo sample file, it's work fine

but when i try to use into my grid, the navigation key is not work.

am i have a wrong code?

Best Regards,

zenixgrace

16/02/2012
08:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello

Try to solate the problem. I think it is in your content. Some things are with conflict. Please use only the grid files and css and then add the other in order to determine where is the problem.

Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

23/02/2012
07:16
Avatar
zenixgrace
Jakarta
Member
Members
Forum Posts: 41
Member Since:
10/05/2010
sp_UserOfflineSmall Offline

Hi Tony,

i try to indenticate the problem with use ur suggestion (use only grid files and css)

but the result is same (navigation key isn't work)

i already found the problem.

the problem is the version in jquery.js

celledit navigation keys is not support in jquery 1.7 +, but work well in jquery 1.6.4 -

will it fix soon?

Best Regards,

zenixgrace

23/02/2012
10:30
Avatar
zenixgrace
Jakarta
Member
Members
Forum Posts: 41
Member Since:
10/05/2010
sp_UserOfflineSmall Offline

Hi Tony,

i try to debug with firebug..

i have some issue when $t.p.knv is show when click a row, seem like it's has a keydown function in jquery 1.6.4 but not in v1.7.0+

i think that code in grid.celledit.js is not work in v1.7.0+ :

            $("#"+$t.p.knv)
            .focus()
            .keydown(function (e){
                kdir = e.keyCode;
                if($t.p.direction == "rtl") {
                    if(kdir==37) { kdir = 39;}
                    else if (kdir==39) { kdir = 37; }
                }
                switch (kdir) {
                    case 38:
                        if ($t.p.iRow-1 >0 ) {
                            scrollGrid($t.p.iRow-1,$t.p.iCol,'vu');
                            $($t).jqGrid("editCell",$t.p.iRow-1,$t.p.iCol,false);
                        }
                    break;
                    case 40 :
                        if ($t.p.iRow+1 <=  $t.rows.length-1) {
                            scrollGrid($t.p.iRow+1,$t.p.iCol,'vd');
                            $($t).jqGrid("editCell",$t.p.iRow+1,$t.p.iCol,false);
                        }
                    break;
                    case 37 :
                        if ($t.p.iCol -1 >=  0) {
                            i = findNextVisible($t.p.iCol-1,'lft');
                            scrollGrid($t.p.iRow, i,'h');
                            $($t).jqGrid("editCell",$t.p.iRow, i,false);
                        }
                    break;
                    case 39 :
                        if ($t.p.iCol +1 <=  $t.p.colModel.length-1) {
                            i = findNextVisible($t.p.iCol+1,'rgt');
                            scrollGrid($t.p.iRow,i,'h');
                            $($t).jqGrid("editCell",$t.p.iRow,i,false);
                        }
                    break;
                    case 13:
                        if (parseInt($t.p.iCol,10)>=0 && parseInt($t.p.iRow,10)>=0) {
                            $($t).jqGrid("editCell",$t.p.iRow,$t.p.iCol,true);
                        }
                    break;
                    default :
                        return true;
                }

CMIIW

is it a jqgrid bug or jquery bug?

i still don't understand..

hihihihihihi

CryCryCry

Best regards,

zenixgrace

07/04/2012
03:33
Avatar
macboat
Member
Members
Forum Posts: 3
Member Since:
07/04/2012
sp_UserOfflineSmall Offline

I 2nd this, only jQuery 1.6.4 and prior version works.  Hopefully we will see a solution soon?

07/04/2012
16:41
Avatar
zenixgrace
Jakarta
Member
Members
Forum Posts: 41
Member Since:
10/05/2010
sp_UserOfflineSmall Offline

yeahh i hope so..

but i believe jqGrid Team can fixed that soon..

LaughLaughLaughLaughLaugh

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
53 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information