This is a migrated thread and some comments may be shown as answers.

PageMethods Load on Demand Client onComplete() Function

1 Answer 80 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 16 Aug 2011, 07:30 PM

Using the PageMethods Load on Demand demos, do I have the ability to hook up a JavaScript onComplete() function as I would with a regular Page Method?

Using the below example, where could I hook up my onComplete() function?:

<telerik:RadTreeView ID="RadTreeView1" runat="server">
    <WebServiceSettings Path="Default.aspx" Method="LoadNodes" />
</telerik:RadTreeView>
[WebMethod]
public static RadTreeNodeData[] LoadNodes(RadTreeNodeData node, object context)
{
    List<RadTreeNodeData> result = new List<RadTreeNodeData>();
    RadTreeNodeData node = new RadTreeNodeData();
    node.Text = "Loaded on demand";
    node.ExpandMode = TreeNodeExpandMode.WebService;
      
    return result.ToArray();
}

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 22 Aug 2011, 07:09 AM
Hello Joe,

You can hook on the onNodePopulated which is fired exactly after the WebService method. This help article may be helpful as well.

Hope this will be helpful.

Best wishes,
Plamen Zdravkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TreeView
Asked by
Joe
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or