Get more information on Kendo UI Treeview node select event
What I want
To fill the div based on the click of the Kendo Treeview node, based on additional information which is server side based.
What am I doing
Using PHP to send arrays as data to manipulate the kendo tree, here is the code:
<?php
require_once 'telerik/wrappers/php/lib/Kendo/Autoload.php';
$treeview = new \Kendo\UI\TreeView('treeview');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->data($data);
// The 'treeview_collapse' JavaScript function will handle the 'treeview_collapse' event of the treeview
$treeview->collapse('treeview_collapse');
//Configuring treeview dataTextField and set its dataSource.
$treeview
->dataTextField('value')
->dataSource($dataSource)
->collapse("onCollapse")
->expand("onExpand")
->select("onSelect")
->navigate("onNavigate");
//Output the TreeView by echoing the result of the render method.
echo $treeview->render();
?>
The $ data variable has the following meaning:
Array
(
[0] => Array
(
[value] => Please select from the following menu
)
[1] => Array
(
[value] => 1. Manage Call Signature
[type] => IMMEDIATE
[closeSession] => false
[items] => Array
(
[0] => Array
(
[value] => Please select your service
)
[1] => Array
(
[value] => 1. Manage MyStatus
[type] => IMMEDIATE
[closeSession] => true
[items] => Array
(
[0] => Array
(
[value] => We are processing your MS request, you will be informed via SMS shortly
)
)
)
[2] => Array
(
[value] => 2. Manage IntroMe
[type] => IMMEDIAte
[closeSession] => true
[items] => Array
(
[0] => Array
(
[value] => We are processing your IM request, you will be informed via SMS shortly
)
)
)
)
)
[2] => Array
(
[value] => 2. Subscribe
[type] => FORWARD
[closeSession] => false
[forwardProtocol] => HTTPGET
)
)
Through the above data this treeview is displayed
So I want to get [type], [closeSession] and [items] and also every time a node is clicked.
My quetion
-
How to use a template or any other technique to send additional information to treeview
-
Extract this (not displayed) js event information in onSelect
+3
source to share
No one has answered this question yet
Check out similar questions: