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.
CType(TabStrip.Groups(0), C1.Web.Command.C1WebGroupHeader).PopulateOnDemand = True
· C#
((C1.Web.Command.C1WebGroupHeader)TabStrip.Groups[0]).PopulateOnDemand = true;
· Delphi
((C1.Web.Command.C1WebGroupHeader)TabStrip.Groups[0]).PopulateOnDemand := true;
Enter the following code to enable the PopulateOnDemand property for all groups in the C1WebTabStrip.
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;
}
· Delphi
for i := 0 to TabStrip.Groups.Count - 1 do
group[i].PopulateOnDemand := true;
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |