Hi,
$opt["rowList"] = array();
…
$grid ["rownum"] = "25", does not work. Always showing 20 records.
and the second question is how to set the default value of the field (eg. current date on date field) but of course, just as the initial entry?
Regards,
Budimir
This seems to be some array name confusion, ideally $opt and $grid both config should be of same array which is passed to ->set_options() function. Please recheck.
For default values, See docs …
Render as textbox with size 20, and initial value in textbox to 10
$col["editoptions"] = array("size"=>20, "value"=>'10');
You can replace this 10 with date("Y-m-d")
I checked but it still does not work.
When I remove (hide) combobox with paging records I always get 20 records per page?
Also, $col['editoptions'] = array ('size'=> 20,'value'=> date('Y-m-d'));
Works but not properly.
Namely, when I edit an existing record then comes to replacing the existing values with default values (again)?
Default value should be assigned only when adding a new record.
Regards,
Budimir
Hello,
Please use defaultValue instead of value.
$col['editoptions'] = array ('size'=> 20,'defaultValue'=> date('Y-m-d'));
For paging fix, please use
$grid["rowNum"] = 15; // or any of your desired rec/page
$grid["rowList"] = array();
…
$g->set_options($grid);
Sample files emailed to you.