Customizing Edit Form

QuestionsCustomizing Edit Form
Randy Blair asked 9 years ago

My edit form settings are:

$grid["form"]["position"] = "center"; // or "all"

$grid["edit_options"] = array('width'=>'800',
"closeAfterEdit"=>true, // close dialog after add/edit
"top"=>"400", // absolute top position of dialog
"left"=>"400" // absolute left position of dialog
$grid["form"]["position"] = "";
$grid["edit_options"]["jqModal"] = true;

It produces the correct size form, but there are no scrollbars or any way to resize the form.

4 Answers
Abu Ghufran answered 9 years ago

To show scrollbars in dialog, you will need 2 changes.

first in code file, add following: (change 400 to your desired height of scrolled view)

$grid["edit_options"]["afterShowForm"] = 'function(f) { f.css("height", "400px"); }';

Next, in lib/inc/jqgrid_dist.php do these changes:

Randy Blair answered 9 years ago

Awesome, Abu! That is exactly what I needed man!

Abu Ghufran answered 9 years ago


Here is the code:

In code, line 82:
I've reduced the height to 100px to show vertical scrollbar.

Romildo answered 8 years ago


In the above example the code was removed on

Please! How to make vertical scrollbars for the forms to edit or add with many rows?

Thank you very much!

Your Answer

10 + 2 =

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?