<%@ Register TagPrefix="ec" Namespace="ASPNETExpert.WebControls" Assembly="ASPNETExpert.WebControls" %>
<%@ Register TagPrefix="ecd" Namespace="ASPNETExpert.WebControls.DemoControls" Assembly="ASPNETExpert.WebControls.DemoControls" %>
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="PopulateOnDemand.ascx.cs" Inherits="ASPNETExpert.WebControls.Demo.Tree.Advanced.PopulateOnDemand" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<table cellpadding="0" cellspacing="0" border="0" width="100%" xmlns:ec="urn:http://aspnetexpert.com/ExpertControls.xsd">
<tr>
<td valign="top">
<ec:ExpertTree id="PopulateOnDemandTree" Skin="XP" runat="server" PopulateOnDemandWaitMessage="Loading. Please wait..."
ExpandOnClick="true" CollapseOnClick="true">
<TREELOOK ShowLines="True" Overflow="Scroll" Height="500px" Width="220px" Base="XP" />
<LOOKS>
<ec:TreeNodeLook id="ParentAnimated" Base="Parent" BindStrategy="OverrideBaseBind">
<SUBTREE Collapse-Duration="150" Collapse-Effect="GlideTopToBottom" Expand-Duration="150"
Expand-Effect="GlideTopToBottom" />
</ec:TreeNodeLook>
</LOOKS>
</ec:ExpertTree>
</td>
<td valign="top" style="PADDING-LEFT:50px">
<ecd:DescriptionView runat="server" ID="Descriptionview1">
<ecd:Description id="Description1" runat="server">The tree in the example shows the file hierarchy. Only the
part of the hierarchy is loaded on initial page load. Other hierarchy
levels are loaded when requested. </ecd:Description>
<ecd:Description id="Description2" runat="server">Set <B>PopulateOnDemand="true"</B> in order
to raise callback upon a node expanding and load the node's children.
Process <B>NodePopulateOnDemand</B> event at the server-side.
</ecd:Description>
<ecd:Description id="Description3" runat="server">Use
<B>TreeNode</B> and <B>TreeNodeCollection</B> properties and methods at
the server side to supplement the node collections in the tree. Set node's
<B>PopulateOnDemand</B> property to <B>false</B> to prevent further
loadings on demand. If you want, however, that loading on demand occurs
every time the node is expanded leave <B>PopulateOnDemand</B> property
without changes. </ecd:Description>
<ecd:Description id="Description4" runat="server"><B>Note</B>, that <B>Populate-On-Demand</B> is similar to
<B>Postback-On-Expand</B> but doesn't cause flicker of the page and
preserves its scroll position. </ecd:Description>
<ecd:Description id="Description5" runat="server">Use <B>PopulateOnDemandWaitMessage</B>
property to set the custom message instead of default <B>Loading...</B>
message. </ecd:Description>
<ecd:Description id="Description6" runat="server"><B>PopulateOnDemandViewStateEnabled</B> property controls
whether the tree view state is kept up-to-date between server callbacks.
By default, it is enabled. </ecd:Description>
</ecd:DescriptionView>
</td>
</tr>
<tr>
<td colspan="2" valign="top" style="PADDING-TOP:6px">
<asp:Button Runat="server" Text="PostBack" id="Button1" />
</td>
</tr>
</table>
<ec:CodeViewTab id="CodeViewTab1" runat="server">
<ec:TabItem id="Tabitem1" runat="server" Text="aspx">
<PRE class="aspcode">
<ecd:SyntaxHighlight id=Syntaxhighlight1 runat="server" OutputFile="Advanced/PopulateOnDemand.ascx" ContentType="ASPX"></ecd:SyntaxHighlight>
</PRE>
</ec:TabItem>
<ec:TabItem id="Tabitem2" runat="server" Text="C#">
<PRE class="aspcode">
<ecd:SyntaxHighlight id=Syntaxhighlight2 runat="server" OutputFile="Advanced/PopulateOnDemand.ascx.cs" ContentType="C#"></ecd:SyntaxHighlight>
</PRE>
</ec:TabItem>
<ec:TabItem id="Tabitem3" runat="server" Text="VB">
<PRE class="aspcode">
<ecd:SyntaxHighlight id=Syntaxhighlight3 runat="server" OutputFile="Advanced/PopulateOnDemand_vb.ascx.vb" ContentType="VB"></ecd:SyntaxHighlight>
</PRE>
</ec:TabItem>
</ec:CodeViewTab>