ComponentOne WebMenus and WebBars for ASP.NET: WebMenus and WebBars for ASP.NET Task-Based Help > AJAX Tasks > Using the PopulateOnDemand Property > Applying PopluateOnDemand to C1WebTabStrip Tabs

Applying PopluateOnDemand to C1WebTabStrip Tabs

With the PopulateOnDemand feature enabled, clicking on a tab in the tab strip at run time sends the content for the tab to the server and back to the client. This avoids the postbacks and improves the performance of the C1WebTabStrip. The PopulateOnDemand property can be set through the designer or through code.

To assign PopulateOnDemand to C1WebTabStrip tabs at design time:

1.   Right-click on the C1WebTabStrip and select Edit Groups. The C1WebTabStripGroup Collection Editor appears.

2.   Select a Group from the Members list and then set its PopulateOnDemand property to True.

To progammatically assign PopulateOnDemand to C1WebTabStrip tabs:

To programmatically assign the PopulateOnDemand property to a specific group in the C1WebTabStrip you should cast the group to the C1WebTabStripGroup or C1WebGroupHeader type.

      Visual Basic

CType(TabStrip.Groups(0), C1.Web.Command.C1WebGroupHeader).PopulateOnDemand = True

      C#

((C1.Web.Command.C1WebGroupHeader)TabStrip.Groups[0]).PopulateOnDemand = true;

Enter the following code to enable the PopulateOnDemand property for all groups in the C1WebTabStrip.

      Visual Basic

For Each group As C1.Web.Command.WebGroupHeader In TabStrip.Groups

   group.PopulateOnDemand = True

Next

      C#

foreach (C1.Web.Command.C1WebGroupHeader group in TabStrip.Groups)

   {

 

    group.PopulateOnDemand = true;

   }


Send comments about this topic to ComponentOne.
Copyright © 1987-2009 ComponentOne LLC. All rights reserved.