Hi,
Is there a defined phpgrid option to focus a paticular column or field input first?
e.g. To focus third field input not first field input when Add or Edit dialog form is opened.
Regards…
3 Answers
For this case, you need to edit core lib (jqgrid_dist.php)
search for code …
$this->options["add_options"]["beforeShowForm"] = 'function(formid) { '.$str_add_form.' }';
and put following line after that.
$this->options["add_options"]["afterShowForm"] = 'function(formid) { jQuery("#gender").focus(); }';
This will focus e.g. gender field at form display.
This would solve your problem.
$grid["add_options"]["afterShowForm"] = 'function(formid) { jQuery("#gender").focus(); }';
$g->set_options($grid);
PS: Ignore last reply.
Your Answer