I’m using the code as provided in the sample provided [url]Start DHTMLX Docs in the Connector section, but the update portion of the code isn’t working - i.e. changes aren’t saved to the database table. The grid renders fine, but updates just don’t get saved.
if ($grid->is_select_mode())//code for loading data
$grid->render_sql("Select * from tableA, tableB where tableA.id=tableB.id", "a.id","name,price,other");
else //code for other operations - i.e. update/insert/delete
$grid->render_table("tableA","id","name,price");
Each $grid->render… works okay by itself. In other words, if I elminate the if…else structure and only use one of the render statements, then that statement works fine.
So the following works great by itself for viewing/rendering the grid
$grid->render_sql("Select * from tableA, tableB where tableA.id=tableB.id", "a.id","name,price,other");
And the following works great for just listing the columns from tableA and UPDATEing the data
$grid->render_table("tableA","id","name,price");
But putting both statements together as shown in the example at the very top = no worky.
I’ve also verified the is_select_mode() is being evaluated correctly, based on whether I’m editing a value in the grid or simply viewing, so I know each branch of the “if…else” statement is being handled, but I’m perplexed on what could possibly be preventing the edited information from being updated in the connected table.
Here’s what I’ve tried unsuccessfully so far, and at this point am at a loss for what else to check (the documentation could surely be a bit more explanatory).
[] I’ve searched around the forums and seen everything from "make sure columns are in identical order for both “render” statements (which I’ve done - no success).[/]
[] I tried changing the “render_table” to a “render_sql” and included all the columns from the single table (no success) [/]
[] Now falling into the spiral of looking at sql_attach and event->attach and something about “beforeUpdate” to try and get this to work[/]
Anyone have any clues that might help me solve this issue?
Thanks in advance.