Customizing Edit Form

QuestionsCustomizing Edit Form
Randy Blair asked 5 years ago

My edit form settings are:

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

$grid["edit_options"] = array('width'=>'800',
"height"=>'500',
"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 5 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: http://hastebin.com/fusuponajo.coffee

Randy Blair answered 5 years ago

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

Abu Ghufran answered 5 years ago

Hi,

Here is the code:
https://gist.github.com/gridphp/a07109a4886273c748a38f8d4ce161a0#file-gistfile1-txt-L82

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

Romildo answered 4 years ago

Hello!

In the above example the code was removed on http://hastebin.com/fusuponajo.coffee.

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

Thank you very much!

Your Answer

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