I have attempted to adapt the DemoSql code to have a month view based on the data in a database. The first error I received was that the control did not have an enddate property. In the documentation I noticed that there were datastartdate and dataenddate properties which I then used for the control parameters. This time I got a problem with the data not being converted to smalldatetime. I changed the database so that every date field had date data in it but still got the same error. Does any one have a working example of a month view calendar the works with a database? Thank you.
<asp:UpdatePanel ID="UpdatePanelCalendar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<DayPilot:DayPilotMonth ID="DayPilotCalendar1" runat="server" DataEndField="A1date"
DataStartField="A1begin" DataTextField="ctype" DataValueField="id" DataTagFields="ctype, id"
DataAllDayField="allday" OnEventMove="DayPilotCalendar1_EventMove" Days="7" EventMoveHandling="CallBack"
ContextMenuID="DayPilotMenu1" OnEventMenuClick="DayPilotCalendar1_EventMenuClick"
EventResizeHandling="CallBack" OnEventResize="DayPilotCalendar1_EventResize"
OnTimeRangeSelected="DayPilotCalendar1_TimeRangeSelected" TimeRangeSelectedHandling="HoldForever"
EventClickHandling="Edit" EventClickJavaScript="alert('Tag["ctype"]: ' + e.tag('ctype'));"
EventSelectHandling="CallBack" ClientObjectName="dpc1" EventEditHandling="CallBack"
OnEventEdit="DayPilotCalendar1_EventEdit" EventDeleteHandling="JavaScript" OnEventDelete="DayPilotCalendar1_EventDelete"
EventDeleteJavaScript="if (confirm('Do you really want to delete \'' + e.text() + '\' ?')) dpc1.eventDeleteCallBack(e);"
OnEventSelect="DayPilotCalendar1_EventSelect" OnRefresh="DayPilotCalendar1_Refresh"
EventSelectColor="Blue" ShowAllDayEvents="True" AllDayEventBackColor="255, 255, 255"
BackColor="#FFFFD5" BorderColor="#000000" CellSelectColor="#316AC5" DataSourceID="SqlDataSourceEvents"
DurationBarColor="Blue" EventBackColor="#FFFFFF" EventBorderColor="#000000" HourBorderColor="#EAD098"
HourHalfBorderColor="#F3E4B1" HourNameBackColor="#ECE9D8" HourNameBorderColor="#ACA899"
NonBusinessBackColor="#FFF4BC" ScrollPositionHour="9" StartDate="2007-09-30"
ContextMenuSelectionID="menuSelection">
</DayPilot:DayPilotMonth>
<asp:SqlDataSource ID="SqlDataSourceEvents" runat="server" ConnectionString="<%$ ConnectionStrings:daypilot %>"
SelectCommand="SELECT [id], [ctype], [A1begin], [A1date], [allday] FROM [citystat] WHERE NOT (([A1date] <= @start) OR ([A1begin] >= @end + 1))">
<SelectParameters>
<asp:ControlParameter Name="start" ControlID="DayPilotCalendar1" PropertyName="StartDate" />
<asp:ControlParameter Name="end" ControlID="DayPilotCalendar1" PropertyName="DataEndField" />
</SelectParameters>
</asp:SqlDataSource>
</ContentTemplate>
</asp:UpdatePanel>