Hi,
Just a quick question. Do you have a PHP demo of a tree view in a splitter, where the on click event changes what is in the center-pane (i.e. goes from a Grid View to loading a Map?
Not sure how this wold work considering the PHP has already run?
Best Regards
Tom.
3 Answers, 1 is accepted
We do not currently have such a demo available. The said scenario can be implemented by calling the splitter ajaxRequest method in the TreeView select event. The ajaxRequest method will replace the pane content with the newly fetched content from the server.
Regards,
Alex Gyoshev
Telerik by Progress
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
Can you please provide the PHP error that is thrown by the methods? They are available in the library source code, in the lib/UI/TreeView.php folder.
Regards,
Alex Gyoshev
Telerik by Progress