It's good to know someone cares. I'll hold onto the towel for now. Ok here's some code that works to display events from my SqlDataSource. I would be very happy if it can do two more things: update an event and navigate to another month. Clicking on theDayPilotMonth does nothing. For navigation I tried both the Javascript and the DayPilotNavigator. The Navigator moves but not the DayPilotMonth.
<script runat="server">
Sub DayPilotMonth1_Command(ByVal Sender As Object, ByVal E As DayPilot.Web.Ui.Events.CommandEventArgs) Handles DayPilotMonth1.Command
Select Case E.Command
case "next"
DayPilotMonth1.StartDate = DayPilotMonth1.StartDate.AddMonths(1)
case "previous"
DayPilotMonth1.StartDate = DayPilotMonth1.StartDate.AddMonths(-1)
case "today"
DayPilotMonth1.StartDate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1)
End Select
DayPilotMonth1.DataBind()
DayPilotMonth1.Update()
End Sub
</script>
<div id="toolbar" style="width:100%">
<a href="javascript:dpm.commandCallBack('previous');">◄</a>
<a href="javascript:dpm.commandCallBack('next');">►</a>
<a href="javascript:dpm.commandCallBack('this');">This Month</a>
</div>
<DayPilot:DayPilotMonth ID="DayPilotMonth1" runat="server" BackColor="#FFFFD5"
BorderColor="Black" CellHeaderBackColor="" CellHeaderFontColor="#000000"
CssClass=""
DataSourceID="SqlDataSourceDP"
DataTextField="name" DataValueField="id" StartDate="2010-08-01" DataStartField="eventstart" DataEndField="eventend"
EventStartTime="false"
EventEndTime="false"
EventBackColor="White"
ClientObjectName="dpm"
OnCommand="DayPilotMonth1_Command"
EventBorderColor="Black" EventFontColor="#000000" EventTimeFontColor="Gray"
HeaderBackColor="#ECE9D8" HeaderFontColor="#000000" InnerBorderColor="#CCCCCC"
NonBusinessBackColor="#FFF4BC" WeekStarts="Auto"
Width="100%" />
<DayPilot:DayPilotNavigator ID="DayPilotNavigator1" runat="server" BackColor="#FFFFD5"
BoundDayPilotID="DayPilotMonth1"
ShowMonths="3"
CssClassPrefix="navigator_silver_"
DataSourceID="SqlDataSourceDP"
DataTextField="name" DataValueField="id" StartDate="2010-08-01" DataStartField="eventstart" DataEndField="eventend"
EventStartTime="false"
EventEndTime="false"
Width="100%" />
<asp:SqlDataSource ID="SqlDataSourceDP" runat="server"
ConnectionString="<%$ ConnectionStrings:KLConnectionString %>"
SelectCommand="SELECT [id], [name], [eventstart], [eventend] FROM [event]"
UpdateCommand="UPDATE [event] SET [name] = @name, [eventstart] = @eventstart, [eventend] = @eventend WHERE [id] = @id">
<UpdateParameters>
<asp:Parameter Name="id" Type="Object" />
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="eventstart" Type="Datetime" />
<asp:Parameter Name="eventend" Type="Datetime" />
</UpdateParameters>
</asp:SqlDataSource>
Thanks.