Hi,
I use the connector cannot load the data in grid, but I don’t use this lib,
<script src="dht/dhtmlxDataProcessor/dhtmlxdataprocessor.js" type="text/javascript" charset="utf-8"></script>
<script src="dht/dhtmlxConnector/codebase/connector.js" type="text/javascript" charset="utf-8"></script>
it can show data in grid. But I can’t change the data in the grid that use dataProcessor.
please help, thank you.
main.php
[code]
<!-- -->
<script src="dht/dhtmlxDataProcessor/dhtmlxdataprocessor.js" type="text/javascript" charset="utf-8"></script>
<script src="dht/dhtmlxConnector/codebase/connector.js" type="text/javascript" charset="utf-8"></script>
<title>Menu Maintenance</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
background-color: #ebebeb;
overflow: hidden;
}
</style>
<script>
function doOnLoad() {
var myLayout, menuGridData;
myLayout = new dhtmlXLayoutObject({
parent: document.body,
pattern: "2E",
cells: [
{ id: "a", text: "A", header: "false" },
{ id: "b", text: "B", header: "false" },
]
});
myLayout.cells("a").setHeight(50);
menuGridData = myLayout.cells("b").attachGrid();
menuGridData.setImagePath("dht/codebase/imgs/");
menuGridData.setHeader("menuId,menuParentId,menuFormId,itemText,itemId,level,levelFlag,subLevelFlag");
menuGridData.init();
menuGridData.loadXML("php/menuMaintenanceConnector.php");
var dp = new dataProcessor("php/menuMaintenanceConnector.php");
dp.init(menuGridData);
}
[/code]
menuMaintenanceConnector.php
<?php
//include db connection settings
require_once("config/config.php");
$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
require("../dht/dhtmlxConnector/codebase/grid_connector.php");
$grid = new GridConnector($res);
$grid->dynamic_loading(5);
$grid->render_table("menu","menuId","menuId,menuParentId,menuFormId,itemText,itemId,level,levelFlag,subLevelFlag");
?>