dhtmlxgrid drag and drop update data

Hello, Im a newbie with mysql and would like some help. I was playing around Drag and Drop between Grids examples. Basically from the demo page, I edited “treeGrid.loadXML(”…/common/grid.xml")" to “treeGrid.loadXML(“php/get1.php”)” and “mygrid.loadXML(”…/common/grid.xml")" to “mygrid.loadXML(“get2.php”)” where both grids dynamically gets the tables. I also added the update script and button. The tree grid grabs “samples_grid1” table and mygrid grabs “sample_grid2” table. It works fine and updates the table when I drag and drop from the tree grid to the mygrid, but when I try to filter the sample_grid2 table using "$sql = “SELECT * from sample_grid2 where shipping=12” on the get2.php file; the database table wont update. Hope I explained it as clear as I can.

If you are using connectors on server side - they can generate auto-updates for render_table, but not clever enough to make updated for render_sql initialization.
You can change the code as

if ($grid->is_select_mode()){
$grid->render_sql(“SELECT * from sample_grid2 where shipping=12”, …
} else{
$grid->render_table(“sample_grid2”, …

In such case it will show only limited set of data in grid, but still will be able to auto update the data.

dhtmlx.com/dhxdocs/doku.php?id=d … ex_updates