ASPX templates
Version 5.x > ASPX templates > CustomTableRepeater View modes: 
User avatar
Member
Member
eric.rovtar-hudsonchapel - 8/9/2010 12:57:38 PM
   
CustomTableRepeater
I cannot seem to get the CustomTable Repeater to return any data.

Could someone please help?

<uc1:CustomTableRepeater ID="ctrPodcasts"
CustomTable="customtable.podcasts"
TransformationName="customtable.podcasts.List"
runat="server" />


Thanks!

-Eric

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/10/2010 4:49:04 AM
   
RE:CustomTableRepeater
Hi,

could you please inspire with following code:

- register custom table repeater in your aspx template:

<%@ Register Src="~/CMSWebParts/CustomTables/CustomTableRepeater.ascx" TagName="customtablerepeater"  TagPrefix="uc1" %>


- add repeater part

<uc1:customtablerepeater ID="CustomTableRepeater1" runat="server" CustomTable="customtable.people" SelectedDatabaseColumnName="ItemID" SelectedQueryStringKeyName="ItemID" SelectedValidationType="int" TransformationName="customtable.people.Default" SelectedItemTransformationName="customtable.people.Preview" EnableViewState="false" />


- your code behind should be simmilar to this one:

using System;
using System.Web;

using CMS.CMSHelper;
using CMS.GlobalHelper;
using CMS.UIControls;


public partial class CMSTemplates_CorporateSiteASPX_Home : TemplatePage
{
protected void Page_Load(object sender, EventArgs e)
{
CustomTableRepeater1.ReloadData();
}

}


Best regards,
Ivana Tomanickova