Update TreeGrid with multitable connector


I have a problem with updating a TreeGrid using the multitable connector.

This is my serverside code

[code]$res=oci_connect(‘connectstring’); //connects to the server with our DB

    $dbtype = "oracle";

    $grid = new \TreeGridMultitableConnector($res, $dbtype);
    $level = $grid->get_level();
    $level = $grid->get_level();
    \LogMaster::log("level: ".$level);
          switch ($level) {
        case 0:
        case 1:

Loading data works, but when I try to update using dataprocessor, get_level() returns -1

This is my clientside code:

[code]var treeGrid = new dhtmlXGridObject(“treeGrid”);
treeGrid.setImagePath(“{{ asset(‘dhtmlx/imgs/’) }}”); //the path to images required by grid
treeGrid.setHeader(“Bezeichnung,Beschreibung,Person”); //the headers of columns
treeGrid.setInitWidths(“*,300,100”); //the widths of columns
treeGrid.setColAlign(“left,left,left”); //the alignment of columns
treeGrid.setColTypes(“tree,ed,ed”); //the types of columns
treeGrid.setColSorting(“str,str,str”); //the sorting types

    treeGrid.kidsXmlFile="{{ path(vendor_plaka_connector_admingrid') }}";
    treeGrid.loadXML("{{ path(vendor_plaka_connector_admingrid') }}");

    var dp = new dataProcessor("{{ path(_vendorplaka_connector_admingrid') }}");

I’m using Symfony 2.6 (“{{ path(_vendorplaka_connector_admingrid’) }}” points to my connector controller).

Philipp Löwen

By any chances, do you have “_” or “,” characters in the row IDs ?
Multitable connector uses “,” as delimiter during id|level serialization, so if you have “,” in the original id value then connector will not be able to work correctly.

The column ids contain a “_” but the row id is a normal oracle NUMBER value.

When I try to update, this is sent to the server:


After replacing %2C for “,”:


That should mean level 1 and id 4, shouldn’t it?

When I add render_table for level=-1, the serverside log shows the following:

[code]level: -1

DataProcessor object initialized
1,4_gr_id => 1,4
1,4_gr_pid => 0,2
1,4_c0 => Stormeldetool
1,4_c1 => Version 3.2
1,4_c2 =>
1,4_!nativeeditor_status => updated
ids => 1,4[/code]

I have no idea what’s wrong here.

Philipp Löwen

Please try to update connector/strategy.php with the attached one.
strategy.zip (2.85 KB)

It works now!
Thank you very much.

Philipp Löwen