Loading Nodes using Webservice - Context?

3 posts, 0 answers
  1. Amar
    Amar avatar
    21 posts
    Member since:
    Oct 2008

    Posted 17 Nov 2008 Link to this post

    Hi,

    I am using a WebMethod to return RadTreeNodeData and the tree gets populated fine on demand. I have a requirement to pass more information to the web method when the treenode is expanded. Can someone please point me in the right direction so i may know how to pass additional information in the context parameter in the webmethod.

    public RadTreeNodeData[] GetDirectoryNodes(RadTreeNodeData node, object context)

    I searched on the forum and in the documentation but have not found any examples.

    Thanks

    Amar



  2. Amar
    Amar avatar
    21 posts
    Member since:
    Oct 2008

    Posted 17 Nov 2008 Link to this post

    After spending a lot of time going through the source code of RadTreeView I managed to find out how to this. The OnClientNodePopulating event needs to be handlled.

    OnClientNodePopulating="ClientNodePopulating" 
     

    Then

        function ClientNodePopulating(sender, eventArgs) { 
            var data = eventArgs.get_context(); 
            data["testItem"] = "hello"
        } 

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 20 Nov 2008 Link to this post

    Hello Amar,

    I am glad that you have found the solution by yourself.

    This approach is described in this online help: Load On Demand Support > Web Service Load On Demand

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top