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

Resize and drag nor working if OnIncludeCell event is used

Asked by Catalin
3 years ago.

I've used the OnIncludeCell event to hide time header cell based on simple logic as below.
This however stops the resize and drag of events from working and throws Uncought error inside the browser console.
Removing the OnIncludeCell it works perfectly.
How can I fix this?

protected void OnIncludeCell(object sender, DayPilot.Web.Ui.Events.Scheduler.IncludeCellEventArgs e)
{
if (e.Start.Hour < 6 || e.Start.Hour > 22)
e.Visible = false;
}

Comment posted by Catalin
3 years ago.

same problem if i put ShowNonBusiness to true. below is my scheduler configuration

<DayPilot:DayPilotScheduler ID="DS"
runat="server"
ClientObjectName="dps1"
Width="100%"
HeightSpec="Fixed"
Height="700"
EventHeight="30"
EventFontSize="11px"
CellDuration="30"
CellGroupBy="Day"
CellWidth="30"
RowHeaderWidthAutoFit="false"
HeaderHeight="20"
HeaderFontSize="8px"

DataStartField="start"
DataEndField="end"
DataTextField="InfoPreview"
DataValueField="id"
DataResourceField="PlantBayId"
DataTagFields="id, name"

ScrollLabelsVisible="false"
EnableViewState="false"
FloatingEvents="false"
BusinessBeginsHour="6"
BusinessEndsHour="22"
ShowNonBusiness="true"
UseEventBoxes="Never"
DynamicLoading="false"
DynamicEventRendering="Disabled"
ProgressiveRowRendering="true"
ProgressiveRowRenderingPreload="30"

ContextMenuID="DayPilotMenuEvents"
ContextMenuSelectionID="DayPilotMenuSelection"
ContextMenuResourceID="DayPilotMenuResources"

OnCommand="OnCommand"

OnBeforeEventRender="OnBeforeEventRender"
OnBeforeTimeHeaderRender="OnBeforeTimeHeaderRender"
OnBeforeCellRender="OnBeforeCellRender"
>
<Resources>
</Resources>
</DayPilot:DayPilotScheduler>

Comment posted by Catalin
3 years ago.

ShowNonBusiness=false doesn't work and gives same exception as OnIncludeCell event.
My bad for previous comment

Answer posted by Dan Letecky [DayPilot]
3 years ago.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.