ExpandMode

14 posts, 0 answers
  1. mike
    mike avatar
    14 posts
    Member since:
    Feb 2009

    Posted 28 Jun 2010 Link to this post

    I have set a RadTreeView to be load on demand using web service method..

    node.ExpandMode =

    TreeNodeExpandMode.WebService;
    [WebMethod]

     

     

    public static RadTreeNodeData[] GetChildNodes(RadTreeNodeData node)

    {
    }

    Works fine when clicking on expand cross.

    How can i do same thing when single clicking on a tree node or auto expand a node when certain conditions apply.

     

  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 30 Jun 2010 Link to this post

    Hi mike,

    You can simply expand the clicked node through client code on ClientNodeClicking event.
    For example:
    function onNodeClicking(sender, args) {
       var node = args.get_node();
       // check if the expandMode is not ClientSide
       if (node.get_expandMode() > 1)
          args.set_cancel(true);
       node.expand();
    }

    Hope this will help you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mike
    mike avatar
    14 posts
    Member since:
    Feb 2009

    Posted 04 Jul 2010 Link to this post

    How can i do this server side, for example when a user first enters treeview screen I wish to expand a particular node, causing the load on demand behind the scenes and have focus on the expanded node?
  5. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 05 Jul 2010 Link to this post

    Hi mike,

    Well, if you have set the ExpandMode of a node to something different than "ClientSide", calling its expand method client-side, will result in triggering LoadOnDemand.

    If you want to expand specific node when the treeView is presented to the client for first time, you can do that on Page_Load time on the server in a "if (!isPostBack){...}" if the TreeView is in a regular page, or persist a flag in the Session if it's on a MasterPage.

    Hope this is helpful for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. mike
    mike avatar
    14 posts
    Member since:
    Feb 2009

    Posted 05 Jul 2010 Link to this post

    I now have the expand mode working how I want it to, however, I need to sometimes refresh the expanded node, scenario is such.....

    The tree nodes are set to TreeNodeExpandMode.WebService.
    When expanding a node the children are appropriately loaded.

    In my application the user can right click (context menus) on an expanded node to edit it and its children (sometimes add/delete/rename a child).
    Each node will have 2 to 3 levels with x amount of nodes.
    Editing occurs within a popup radwindow.

    The problem I have is, upon returning from the radwindow I need to refresh the allready expanded node, how can I do this without reloading the whole tree.
    I need to somehow unload the expanded node then reload by expanding it.
  7. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 07 Jul 2010 Link to this post

    Hi mike,

    Currently the problem is only when used ServerSideCallBack and expanded on the server.

    Could you please share what kind of scenario would require to have nodes with anything but client-side expand mode over a expanded node? I mean, is there something that you can not achieve with this limitation?

    Please if there is such a requirement, share it with us and we will do our best to help you achieve this!

    Hope this is helpful for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. mike
    mike avatar
    14 posts
    Member since:
    Feb 2009

    Posted 08 Jul 2010 Link to this post

    I think you may missunder stand me,

    What I wish to do is re-populate an already expanded node.
    I find that once a node is populated and expanded I have no way to refresh it after changes are made.

    Please re-read my last post as it explains what I am trying to accomplish.
  9. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 12 Jul 2010 Link to this post

    Hi mike,

    Well, once the RadWindow is closed you can:
    1. remove the nodes from the currently updated node:
    updatedNode.get_nodes().clear();
    2. set its ExpandMode to a WebService and expand the node:
    node.set_expanded(false);
    // "3" is the index of WebService in the TreeNodeExpandMode enumeration
    node.set_expandMode(3);
    node.set_expanded(true);

    Hope this is going to help you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 22 Oct 2010 Link to this post

    Hi Nikolay Tsenkov,

    its working fine,but navigate url is not working,pls help me

    Thanks!
    Srinivasa Rao Ranga
  11. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 22 Oct 2010 Link to this post

    Hello Srinivasa Rao Ranga,

    Could you, please, explain in a bit more detail what seems to be the problem?
    Probably even better approach would be to open a support ticket and send me a sample reproducing it, too.

    Hope that soon we will resolve this for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 22 Oct 2010 Link to this post

    Hi,Nikolay Tsenkov

    I am loading the treeview content  using sitemap,my requirement is ,if a user click (single or double) on the parent node,the node should expand,but it is not happenening.

    if i use your method:

    function onNodeClicking(sender, args) {
       var node = args.get_node();
       // check if the expandMode is not ClientSide
       if (node.get_expandMode() > 1)
          args.set_cancel(true);
       node.expand();
    }

    its working fine,but navigate url for the child itesms is not working.

    Thanks!
    Srinivasa Rao Ranga
  13. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 27 Oct 2010 Link to this post

    Hi Srinivasa Rao Ranga,

    Could you, please, try the following:
    function onNodeClicking(sender, args) {
       var node = args.get_node();
       // check if the expandMode is not ClientSide
       if (node.get_expandMode() > 1)
       {
          args.set_cancel(true);
          node.expand();
       }
    }

    I hope this is going to work for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Srinivasa Rao Ranga
    Srinivasa Rao  Ranga avatar
    20 posts
    Member since:
    May 2010

    Posted 27 Oct 2010 Link to this post

    Hi ,Nikolay Tsenkov

    I tried the code,now i am able to navigate,but i am not able to expand on click of the node text instead of "+" symbol

    Thanks!
    Srinivas
  15. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 01 Nov 2010 Link to this post

    Hi Srinivasa Rao Ranga,

    Please, post a simple page and an algorithm to reproduce the problem you experience.
    I am starting to confuse, what exactly is the scenario in which you are not able expand and navigate.

    Hope that soon we will resolve the problem!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017