I started using the php GridConnector to get server side data for the Grid. I also wanted to use the GridConfiguration to set a few distinct configurations on the server side. It worked great with render_table, but when I use render_sql for a complex select query, it does not include the header data in the generated xml.
Any idea what I need to do to make this work? The complete code for the server side xml data generator is as follows:
<?php require("grid_connector.php"); require("db_oracle.php"); $res = oci_connect("user", "pass", "db"); $grid = new GridConnector($res, "Oracle"); $config = new GridConfiguration(); $config->setHeader(array("Name","Data Center", "OS", "Version", "Manufacturer", "Model", "Processors", "RAM", "Serial", "UUID", "Host Key", "Last Update")); $config->setInitWidths("200,80,180,160,150,240,90,60,100,270,240,150"); $config->setColAlign("left,left,left,left,left,left,left,left,left,left,left,left"); $config->setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro"); $config->setColSorting("str,str,str,str,str,str,int,int,str,str,str,date"); $grid->set_config($config); if (isset($_REQUEST['application'])) { $grid->render_sql("SELECT A.* FROM HOST_H A, APPLICATION_HOST B WHERE A.ID = B.HOST_ID AND B.APPLICATION_ID = '" . $_REQUEST['application'] . "'","ID","NAME, DATACENTER, OS, VERSION, MANUFACTURER, MODEL, PROCESSORS, RAM, SERIAL_NUMBER, BIOS_UUID, HOST_KEY, LAST_UPDATE"); } else { $grid->render_table("HOST_H","ID","NAME, DATACENTER, OS, VERSION, MANUFACTURER, MODEL, PROCESSORS, RAM, SERIAL_NUMBER, BIOS_UUID, HOST_KEY, LAST_UPDATE"); } ?>