Default value pulldown with bulkedit

QuestionsDefault value pulldown with bulkedit
Michael Stender asked 3 years ago

When using bulkedit instead of edit the function stops working.
Code used:
$opt["bulkedit_options"]["afterShowForm"] = "function (id)
var rowid = jQuery(this).jqGrid('getGridParam','selrow')
var rd = jQuery('#list1').jqGrid('getCell', rowid, 'temp_id');

"rowid" remains empty.

Using the same code for normal edit works just fine.

4 Answers
Abu Ghufran answered 3 years ago

On line:

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

Instead of 'this', use:

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

Michael Bawden answered 3 years ago

Silly me, totally overlooked that part. You don't want to know how long I stared at it.. Anyway, the "rowid" and the "rd" are no longer empty!
But, jQuery('select[name=assigned].editable').val(rd); does not set the default on the pulldown in the bulkedit box.

Abu Ghufran answered 3 years ago

Working demo for text box:

For your dropdown code to select default, the passed value must be an option of select to auto-select.

Michael Bawden answered 3 years ago

Thanks Abu, you have no idea how much easier phpgrid makes my site for my clients.
Keep up the good work!

Your Answer

1 + 19 =

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!