Hi,
I am sorry for confusing. The UniPager control must be related to a viewer. It is possible to bind the Data source control to a viewer and then the Unipager control to that viewer. The Google maps repeater can be delayed and later load the data source of the viewer which is already paged.
The sample code of .ascx (a cloned GoogleMaps control):
<cms:CMSQueryDataSource ID="srcElem" runat="server" QueryName="cms.office.london" PageSize="1" />
....
<cms:CMSRepeater ID="repItems" runat="server" EnableViewState="true" OnItemDataBound="repItems_ItemDataBound" DelayedLoading="true" StopProcessing="true" />
....
<cms:UniPager ID="UniPager2" runat="server" PageControl="test" PageSize="1" PagerMode="PostBack" >
<%-- UniPager templates ----------------------------------------------------------- --%>
<PageNumbersTemplate>
<a href="<%# Eval("PageURL") %>"><%# Eval("Page") %></a>
</PageNumbersTemplate>
<%-- UniPager templates ----------------------------------------------------------- --%>
</cms:UniPager>
<cms:BasicRepeater ID="test" runat="server" />
and the code behind (.cs):
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
this.test.ItemTemplate = CMSDataProperties.LoadTransformation(this, "cms.office.simple", false);
this.test.DataSource = srcElem.DataSource;
this.test.DataBind();
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
....
this.repItems.StopProcessing = false;
this.repItems.DataSource = test.DataSource;
this.repItems.DataBind();
}
I hope it will help you.
Best regards,
Helena Grulichova