Customizing double click behaviour

QuestionsCustomizing double click behaviour
Juan Antonio Palacios asked 2 years ago

Hello Abu,

I have a question related to this post: https://www.gridphp.com/support/questions/making-the-row-action-buttons-trigger-a-pop-up-form/

The solution proposed on that post is working well: I applied it to a master-detail grid, and both ways to interacting with a row (click on the pencil button of a row AND double clicking on a row) trigger the edit form for that row.

Now i need to add another detail grid that will be read-only, so for this specific new grid, those actions should trigger the view form instead of the edit form.

How can I customize different actions for the double click in different grids? Thanks in advance

1 Answers
Abu Ghufran Staff answered 2 years ago

With the following code, you can use grid is to have this restricted to a grid. e.g. instead of var opts, use var opts_list1, where list1 is your grid id. e.g.

var opts_list3 = { 'ondblClickRow': function (id) { jQuery(this).jqGrid('viewGridRow', id, <?php echo json_encode_jsfunc($g->options["view_options"])?>); } };

Ref: https://www.gridphp.com/docs/dialog-customization-faqs/#q-how-to-show-view-record-dialog-on-row-double-click-show-dialog-on-row-edit-button

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

3 + 15 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?