Button in the view form.

QuestionsButton in the view form.
Montemaggiore Sebastian asked 4 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 4 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

20 + 7 =

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 / 5. Vote count:

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

Let us improve this post!