hi...
i have treeView(populate onDemand) in updatePanel, and i want to add updateProgress animation or message, dynamically near to the selected node(parent node), someone have an idea how to implement that?
thanks...
Hi,???Here are some sample codes about asp:TreeView working with asp:UpdateProgress for your reference.
??? <div>
<asp:UpdatePanel ID="UpdatePanel8" runat="server">
<ContentTemplate>
<asp:TreeView ID="tv" runat="server" OnSelectedNodeChanged="tv_SelectedNodeChanged">
<Nodes>
<asp:TreeNode Text="File" Value="File"></asp:TreeNode>
<asp:TreeNode Text="Edit" Value="Edit"></asp:TreeNode>
<asp:TreeNode Text="View" Value="View"></asp:TreeNode>
</Nodes>
</asp:TreeView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress2" runat="server"
AssociatedUpdatePanelID="UpdatePanel8"
DisplayAfter="2000"
DynamicLayout="False">
<ProgressTemplate>
UpdatePanel1 is updating now!
<input type="button" id="AbortCallbackButton" value="Abort" onclick="AbortCallback()" />
</ProgressTemplate>
</asp:UpdateProgress>
<br />
This is text after the UpdatePanel and UpdateProgress controls.
<script type="text/javascript">
function AbortCallback()
{
Sys.WebForms.PageRequestManager.getInstance().abortPostBack();
}
</script>
</div
protected void tv_SelectedNodeChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(10000);
}
Wish this can give you some helps.
No comments:
Post a Comment