Hi,
I use an array to fill in a dropdown list, here are the parameters:
$col[“edittype”] = “select”;
$col[“formatter”] = “select”;
$col[“editoptions”][“value”] = get_dropdown($con,’Select id_priority, priority From ev_priority Order By id_priority’);
I created the function get_dropdown that returns me this array:
Array ( [0] => 0:No visitar [1] => 1:Alta [2] => 2:Media [3] => 3:Baja [4] => 4:Muy baja [5] => :->borrar )
I can see the dropdown list in the grid but when changing a value, nothing happens
My field id_priority in the database is INT(1) as values can be from Null to 4.
Message from Grid is “Record updated”
Should the grid normally return any message in case data do not suit the database field format?
Any idea of what can be happening?
Thanks
Hi, I found the answer, I has a mistake in field name “Priority” that I wrote with uppercase “P” and in my database was with “p”
$col[“name”] = “Priority”; -> the $col[“name”] = “priority”;
But whay do the grid tells me “Record updated”? ¿You don’t manage database errors?
Hello,
I rechecked your query about database errors. We do check fields and show database error if there is one.
In most databases, the query executes correctly even if field name is capitalized in update query. The reason for not displaying could be wrong JSON mapping of field and data records. It should have exact field name that is used in your SELECT SQL selection to map and display on grid.