TreeView node select on RequestEnd event

2 posts, 1 answers
  1. Ross
    Ross avatar
    7 posts
    Member since:
    Sep 2006

    Posted 30 Dec 2012 Link to this post

    After reading other various forum articles and documentation it looks like selecting the parent node (or any other node) is possible when the tree is initialised.  However, with the following code the first node is not selected.  It's a pretty simple bit of code, so would appreciate any help.

                            .DataSource(dataSource => dataSource
                                        .Read(read => read
                                              .Action("GetNameList", "Home"))
                                              .Events(e => e.RequestEnd("onRequestEnd"))
        var treeview;
        $(document).ready(function () {
            treeview = $("#treeview").data("kendoTreeView");
        function onRequestEnd() {

  2. Answer
    Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 31 Dec 2012 Link to this post

    Hello Ross,

    Use the dataBound event of the TreeView - because the requestEnd event of the dataSource is triggered before the TreeView is actually reconstructed and thus the selection of a node at this time will be obliterated.

    Kind Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top