Hi,
I've couple of issues with add/edit in the grid. Not sure if I am doing something wrong.
1) I've a grid with columns lets say col_1, col_2, col_n. I do not wish to edit column col_1 value but other columns can be edited but col_1 should be editable when I add a new row.
I've tried
$col["show"] = array("list"=>true, "add"=>true, "edit"=>false, "view"=>true);
But no success.
2) I've a grid showing data from other table with FK reference. Values are being displayed correctly but I am not able to edit/add rows.
I've searched throw the forums here and crossed checked that PK is already set.
here is code of the column
$col = array();
$col["title"] = "Alert type"; // caption of column
$col["name"] = "alert_type_id"; // grid column name, same as db field or alias from sql
$col["dbname"] = "alert_type.id";
$col["editable"] = true;
$client_lookup = $g->get_dropdown_values("select distinct id as k, name as v from alert_type");
$col["edittype"] = "select";
$col["editoptions"] = array("value" => $client_lookup);
$col["editrules"] = array("required"=>true);
$col["width"] = "30";
$cols[] = $col;
any help would be appreciated.
Regards
Prashant
Both options are available in licensed version.
For #1, your solution is correct but might need updated version.
For #2, you need to use custom on_update events and grid by default do DML operations on only one table. Refer dropdown.php for more help in package (if using licensed version)