search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Width and BeforeEventRender probelms after upgrade

Asked by Anonymous
10 years ago.

Hi,

I've inherited a project that used an older version of DayPilotScheduler and was having some issues with display in IE so I decided the frist thing to try would be to upgrade to the latest version. However I am having a couple of probelms:

Problem 1: The width property does not seem to work. This is my ASP.NET declaration of the scheduler:

<DayPilot:DayPilotScheduler ID="DayPilotScheduler1" runat="server" Days="365" DataStartField="startTime" DataEndField="endTime" DataTextField="Title" DataValueField="calendar_id" HeaderFontSize="8pt" HeaderHeight="17" DataResourceField="eventCategory" EventHeight="40" CellDuration="1440" CellWidth="30" CellGroupBy="Month" TimeRangeSelectedHandling="Hold" DataTagFields="TextColour, ToolTip, Title, DiaryColour"
ClientObjectName="dps1" Width="640" OnEventClick="DayPilotScheduler1_EventClick" EventClickHandling="PostBack" HeightSpec="Fixed" Height="40">

But when it is rendered, the width is HUGE:

<div id="ctl00_ContentPlaceHolder1_DayPilotScheduler1" style="width:11030px;line-height:1.2;">

Problem 2:

The existing code used the BeforeEventRender to set things up such as a tooltip for each event in the calendar as below:

protected void DayPilotScheduler1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.BeforeEventRenderEventArgs e)
{
string strColour = e.Tag["TextColour"];

if (strColour != "")
{
e.BackgroundColor = strColour.Trim();
}

e.DurationBarColor = "Orange";
e.InnerHTML = "<font color=" + e.Tag["DiaryColour"].Trim() + ">" + e.Tag["Title"] + "</font>";
string strTT = e.Tag["ToolTip"];
strTT = strTT.Replace("\r\n","\\n");
e.ToolTip = strTT;
}

However this event does not seem to exist in the latest version, and I cannot find an equivalent.

Another minor issue is that I can't set the scroll position as before:

DayPilotScheduler1.ScrollPosition = DateTime.Today.AddDays(-14)

Since ScrollPosition is not a property of the scheduler any more.

Any help with any of these issues would be greatly appreciated! I have searched the web but I can't seem to find anything that will help me.

Answer posted by Dan Letecky
10 years ago.

Issues #1 and #2 could indicate that you have downloaded the Lite edition instead of the Pro edition.

The Lite edition doesn't support scrollbars and BeforeEventRender event.

The latest Pro edition uses SetScrollX() method to set a scroll position using a DateTime parameter.

Comment posted by Anonymous
10 years ago.

Ah OK - thanks Dan

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.