Double click to open "View selected row"

QuestionsDouble click to open "View selected row"
Martin Gossmann asked 9 years ago

I like to open the detailed record view (the popup that you get by clicking the 'View selected row' button in the status line) with a double click on the row. The grid is in read-only mode (no editing). Is that possible? How would I do that?

1 Answers
Abu Ghufran answered 9 years ago

Pasting from faq:

Q) How to show "Edit Record" or "View Record" dialog on row double click?

Following code snippet will enable edit dialog on row double click. This will be placed in before we echo $out variable. `$g` is the jqgrid() object.

<script>
var opts = {
'ondblClickRow': function (id) {
jQuery(this).jqGrid('editGridRow', id, <?php echo json_encode_jsfunc($g->options["edit_options"])?>);
}
};
</script>

<div style="margin:10px">
<?php echo $out?>
</div>

To show view record dialog, just replace `editGridRow` with `viewGridRow`, and `edit_options` with `view_options`

Your Answer

17 + 1 =

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?