ComponentOne Gallery for ASP.NET Web Forms
Task-Based Help / Loading Gallery Items on Demand
In This Topic
    Loading Gallery Items on Demand
    In This Topic

    C1Gallery supports retrieving data (nodes) dynamically. Child items are loaded using AJAX when they are scrolled into view. In the examples below you'll enable loading data on demand by setting the LoadOnDemand property to True.

     

    In Source View

    In Source view add LoadOnDemand="True" to the <cc1:C1Gallery> tag so it appears similar to the following:

    <cc1:C1Gallery ID="C1Gallery1" runat="server" LoadOnDemand="True">
    

     

    At Design Time

    In Design view, select the C1Gallery control and in the Properties window set the LoadOnDemand property to True.

     

    In Code

    Add the following code to the Page_Load event:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1Gallery1.LoadOnDemand = True                                        
    

    To write code in C#

    C#
    Copy Code
    this.C1Gallery1.LoadOnDemand = true;
    
    See Also