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
editGridRow method doesn't trigger navGrid edit events (beforeShowForm, etc.)
24/06/2013
10:55
Avatar
unirgy
Member
Members
Forum Posts: 3
Member Since:
23/01/2012
sp_UserOfflineSmall Offline

For example if I have this:

    ondblClickRow: function(rowid, iRow, iCol, e) {
        $(this).jqGrid('editGridRow', rowid);
        e.stopPropagation();
    }

And then:

.jqGrid('navGrid', '#pager', {'add':true,'edit':true,'del':true}, {     
    beforeShowForm: function(form) {
         console.log(123);
    } 
})

The event will be triggered on edit button, but not on double click.

Do they need to be triggered manually?

Do I need to use a different event? 

Call event code from ondblclick as well?

24/06/2013
14:10
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

It's not a bug. You should just call editGridRow with options which you need if you call the method directly.

What you can do is about the following:

var formEditingOptions = {
        // definition of some callbacks
        beforeShowForm: function(form) {
            console.log(123);
            ...
        },
        // definition of some options
        recreateForm: true
    };

// create the grid
 ... 
     ondblClickRow: function(rowid, iRow, iCol, e) {
         $(this).jqGrid('editGridRow', rowid, formEditingOptions);
         e.stopPropagation();
     } 

// create navigator bar
.jqGrid('navGrid', '#pager', {'add':true,'edit':true,'del':true},
    formEditingOptions,  // options of Edit form
    formEditingOptions); // options of Add form

In the case you will use the same options for dirrect calling of editGridRow and for creating of Add/Edit forms by navGrid.

Best regards
Oleg

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
63 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