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

Empy header cell for next columns if treeEnabled = true

Related article: PHP Hotel Room Booking System (JavaScript/HTML5, MySQL)
Asked by Mikolaj
3 years ago.

Hi, I followed your tutorial.. everything is perfect :)

But if we added option customize headers as you we have issue how make parent header row cells empty in columns eg bed, css color or anything generated by onBeforeRowHeaderRender if we group headers row

We want empty cells in parent tree as in second example image... but can't find way for now

Thank you

Answer posted by Dan Letecky [DayPilot]
3 years ago.

The column content is set in onBeforeRowHeaderRender event handler. You'll need to modify it to exclude parent rows:

dp.onBeforeRowHeaderRender = (args) => {

    // skip parent rows
    if (args.row.children().length > 0) {
        return;
    }

    const beds = (count) => {
        return count + " bed" + (count > 1 ? "s" : "");
    };

    args.row.columns[1].html = beds(args.row.data.capacity);
    switch (args.row.data.status) {
        case "Dirty":
            args.row.cssClass = "status_dirty";
            break;
        case "Cleanup":
            args.row.cssClass = "status_cleanup";
            break;
    }

    args.row.columns[0].areas = [
        {right: 3, top: 3, width: 16, height: 16, cssClass: "area-menu", action: "ContextMenu", visibility: "Hover"}
    ];

};
Comment posted by Mikolaj
3 years ago.

Thank you.. it's working like magic :) we must more deep into documentation :) because is so huge of possibilities

Only for those.. which want also disable css border on parent row... need to comment out this in <style>

.scheduler_default_rowheadercol2 .scheduler_default_rowheader_inner {} and define own classes like is done in style like .status_dirty.scheduler_default_rowheadercol2 and add after must be in onBeforeRowHeaderRender

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