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
ondblClickRow - add event to calling parameters
27/09/2009
08:11
Avatar
DRHansen
Member
Members
Forum Posts: 6
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

Hi Tony,

What would you think about adding the event to the parameters passed to user-defined functions for ondblClickRow:

     • grid.base.js ~line 1238 in jqGrid version 3.5.3

        if( ondblClickRow ) {
            $(this).dblclick(function(e) {
                td = (e.target);
                ptr = $(td,ts.rows).parents(”tr.jqgrow”);
                if($(ptr).length === 0 ){return false;}
                ri = ptr[0].rowIndex;
                ci = !$(td).is('td') ? $(td).parents(”td:first”)[0].cellIndex : td.cellIndex;
                if(isMSIE) {ci = $.jgrid.getAbsoluteIndex(ptr[0],ci);}
                ts.p.ondblClickRow($(ptr).attr(”id”),ri,ci, e);
                return false;
            });
        }

     Then, in ondblClickRow: in the jqGrid definition, we could harvest the shiftKey and other goodies from the event –

  ondblClickRow:    function(rowId, iRow, iCol, e) {
                       if(e.shiftKey) {
                           addRowBasedOnThisRow();   // Use this row's values as a template for add
                       } else {
                           editThisRow();
                       }
  },

    It might make sense for onRightClickRow: as well.  Others?

Thanks,

DRHansen

29/09/2009
11:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. Good idea. Added in GitHub. Also I add this to onrightClick event

Best Regards

Tony

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.

29/09/2009
11:54
Avatar
DRHansen
Member
Members
Forum Posts: 6
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

Tony,

    Thank you sir!  I'm using it already.

DRHansen

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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