camarotta-optonline
-
7/22/2009 11:01:10 AM
Using WhereCondition in CMSRepeater with Calendar
Hi, I just started using Kentico and I'm trying to modify the calendar control to coordinate with the cmsrepeater so when a user clicks a date (I have that working), the details of the events are displayed below.
I want to extract the events by month in the detail repeater. I have the cmsrepeater almost working but I can't get the right month.
I tried this code:
<cms:CMSRepeater ID="repEvent" runat="server" OrderBy="EventDate" classnames="cms.event" TransformationName="CMS.Event.TestEventPreview" Path="/%" DelayedLoading="true" WhereCondition="Month(EventDate)=<%=VisibleMonth()%>/>
and
<cms:CMSRepeater ID="repEvent" runat="server" OrderBy="EventDate" classnames="cms.event" TransformationName="CMS.Event.TestEventPreview" Path="/%" DelayedLoading="true" WhereCondition="Month(EventDate)=<%#VisibleMonth()%>/>
But this just bombs in code because it doesn't process the server tags.
Then I tried setting in code behind:
repEvent.WhereCondition="Month(EventDate)=" + VisibleDate.Month;
But it's not coordinated, the visible date is always the prior selected month by the time I get here.
Can you help please?
Thanks! Carol
|