Dan,
I have the scheduler control working fine in an aspx page, with a bubble and a context menu. I refactored the code into a web part and installed it into SharePoint. The schedule data is displaying properly, but the time zoom, context menu and bubble are not working. The relevant parts of my web part code are included below.
Do you have a working SharePoint web part example that you could share?
Thanks,
Dennis
public class TimeWebPart : WebPart
{
protected DayPilotScheduler schedule;
protected DayPilotBubble bubble;
protected DayPilotMenu menu;
protected override void CreateChildControls()
{
schedule = new DayPilotScheduler();
this.Controls.Add(schedule);
bubble = new DayPilotBubble();
this.Controls.Add(bubble);
menu = new DayPilotMenu();
this.Controls.Add(menu);
}
protected override void Render(HtmlTextWriter writer)
{
PopulateSchedulerControl();
schedule.RenderControl(writer);
bubble.RenderControl(writer);
menu.RenderControl(writer);
}
protected void PopulateSchedulerControl()
{
// Initialize the schedule control.
schedule.DataStartField = "start";
schedule.DataEndField = "end";
schedule.DataResourceField = "resource";
schedule.DataTextField = "name";
schedule.DataValueField = "id";
schedule.DataTagFields = "id";
schedule.ClientObjectName = "dps1";
schedule.StartDate = DateTime.Parse("1/1/2008");
schedule.Days = 90;
schedule.CellDuration = 1440;
schedule.CellGroupBy = DayPilot.Web.Ui.Enums.GroupByEnum.Week;
schedule.CellWidth = 30;
schedule.Refresh += new DayPilot.Web.Ui.Events.RefreshEventHandler(Schedule_Refresh);
schedule.BeforeTimeHeaderRender += new DayPilot.Web.Ui.Events.BeforeTimeHeaderRenderEventHandler(Schedule_BeforeTimeHeaderRender);
// ...
// Configure the bubble control.
bubble.ID = "Bubble";
bubble.ClientObjectName = "bubble";
bubble.RenderContent += new DayPilot.Web.Ui.Events.BubbleRenderContentEventHandler(Bubble_RenderContent);
schedule.BubbleID = bubble.ID;
// Configure the context menu.
menu.ID = "ContextMenu";
MenuItem item = new MenuItem();
item.Text = "Edit...";
item.Action = MenuItemAction.NavigateUrl;
item.NavigateUrl = "http://158.228.58.211:5555/CRMVPC/userdefined/edit.aspx?etc=10004&id={{0}}";
item.NavigateUrlTarget = "_blank";
menu.MenuItems.Add(item);
schedule.ContextMenuID = menu.ID;
}