Hi Alex,
It seems that Tom is having issues replying to this ticket:
I am trying to get a lazy loaded KendoUI treeview working in PHP, but having problems getting the images for the nodes to work, I have the following defined:
$treeview = new \Kendo\UI\TreeView(''packagebrowser'');
$read = new \Kendo\Data\DataSourceTransportRead();
$read->url(''/treedata.php'');
$read->contentType(''application/json'');
$transport = new \Kendo\Data\DataSourceTransport();
$transport->read($read);
$model = new \Kendo\Data\HierarchicalDataSourceSchemaModel();
$model->id("structid");
$model->hasChildren("haschildren");
$schema = new \Kendo\Data\HierarchicalDataSourceSchema();
$schema->model($model);
$dataSource = new \Kendo\Data\HierarchicalDataSource();
$dataSource->transport($transport);
$dataSource->schema($schema);
$treeview->dataSource($dataSource);
$treeview->dataTextField("text");
// $treeView->dataSpriteCssClassField(''sprite''); // this blows up php
// $treeView->dataImageUrlField(''imageurl''); // this also blows up php
$treeview->select(''treeview_select'');
echo $treeview->render();
and the JSON data is defined as:
$row["text"] = $sObjName;
$row["guid"] = $sObjGUID;
$row["type"] = $sObjType;
$row["structid"] = $sObjStructure;
$row["haschildren"] = ($row["structid"] != '''');
$row["sprite"] = strtolower($sObjResType);
$row["imageurl"] = "images/" . strtolower($sObjResType) . ".png";
$rows[] = $row;
:
echo json_encode($rows);
Everything works except for the images, I have tried to assign images is two different ways (as both a sprite of a bigger image and as individual files) but each causes an error and the entire PHP file fails.
Can you provide any guidance that fix this problem?
thanks
Regards,
Faten
Telerik by Progress
Join us on our journey to create the world's most complete HTML 5 UI Framework -
download Kendo UI now!