Button in the view form.

QuestionsButton in the view form.
Montemaggiore Sebastian asked 5 years ago

Hello. It´s possible to add a button in the view form in order to print the details of a record?. Thanks.

1 Answers
Abu Ghufran answered 5 years ago

It's not supported in library, but can be done with custom code.

You can refer demos/editing/dialog-layout.php

// Edit button in view dialog
$opt["view_options"]["beforeShowForm"] = 'function (form) { … }';

In onclick handler, you can open a new php page in which you pass selected row id and use custom code to print.

to get selected row id (list1 is grid id)

var rowid = jQuery('#list1').jqGrid('getGridParam','selrow');

Your Answer

4 + 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?