Add another function to double click to open edit dialogue

QuestionsAdd another function to double click to open edit dialogue
edwardw asked 11 years ago

Hi Abu

Everything that you've helped me with has worked perfectly. Thank you for that. I've added code to open the edit dialogue when I double click a row. I also have a custom function that I'd like to fire when the dialogue opens. You helped me with change_label_text(id) which replaces header images with text. That function works fine when I click the edit button. How can I make it work with the double click function that you gave me.

Thank you again

1 Answers
Abu Ghufran answered 11 years ago

Hello,

If you are using code from faq page, this will pass your edit_options parameters on dblclick.
Refer the 3rd argument of function
<?php echo json_encode_jsfunc($g->options["edit_options"])?>

<script>
var opts = {
'ondblClickRow': function (id) {
var rowid = jQuery(this).jqGrid('getGridParam','selrow'); // returns null if no row is selected (single row)
jQuery(this).jqGrid('editGridRow', rowid, <?php echo json_encode_jsfunc($g->options["edit_options"])?>);
}
};
</script>

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

Your Answer

1 + 0 =

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?