Demo does not work, DayPilot / HideNonBusiness!
Asked by Elizaveta
12 years ago.
Hello!
The example does not work: "hiding lunch break", see the file
Answer posted by Dan Letecky [DayPilot]
12 years ago.
This is now fixed in the latest release:
http://www.daypilot.org/daypilot-pro-for-asp-net-webforms-7-6-sp1.html
This old mechanism of hiding columns using BeforeTimeHeaderRender event is no longer available.
There is a new event called IncludeCell that is more user-friendly. Example:
protected void DayPilotScheduler1_IncludeCell(object sender, IncludeCellEventArgs e)
{
// hiding lunch break
if (e.Start.Hour == 13)
{
e.Visible = false;
}
}
Changes:
- Use IncludeCell instead of BeforeTimeHeaderRender
- You don't need to check for !e.IsColGroup
- ShowBusinessHours doesn't have to be set to false. ShowBusinessHours="false" now only sets the default cell visibility.
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.