The onBeforeGridLineRender event is fired before each grid line is rendered. You can use this event to hide the line or add custom CSS.
There are three types of grid lines. The type is stored in the args.type property:
Available since version 2020.3.4629.
DayPilot.Scheduler.onBeforeGridLine(args)
Hide vertical grid lines:
dp.onBeforeGridLineRender = function(args) {
if (args.type === "VerticalLine") {
args.hidden = true;
}
};Hide horizontal grid lines:
dp.onBeforeGridLineRender = function(args) {
if (args.type === "HorizontalLine") {
args.hidden = true;
}
};Add custom CSS class to vertical lines separating days:
dp.onBeforeGridLineRender = function(args) {
if (args.type === "VerticalLine") {
if (args.end.getTimePart() === 0) {
args.cssClass = "midnight-line";
}
}
};