Support needed for below queries:
1. Enable checkbox by default
2. In field, how to read data from other DB sources (e.g. Category table which has all categories for shop)
3. On selection of some value how to trigger value selection for other field in DB. (Say I selected product from one field. Want to populate product ID in other column)
Regards,
Am
#1. You can pre-check checkbox by following code. See the bold item. Valid for data insertion.
$col = array();
$col["title"] = "Closed";
$col["name"] = "closed";
$col["width"] = "50";
$col["editable"] = true;
$col["edittype"] = "checkbox"; // render as checkbox
$col["editoptions"] = array("value"=>"1:0", "checked"=>"checked"); // with these values "checked_value:unchecked_value"
$col["formatter"] = "checkbox";
#2. Please refer dropdown.php, where client name is shown from clients table, and client_id is used for invoice table.
Regards,
PHP Grid Support