How to make a grid_view schedule in a layout cell

I’m trying to create a grid in a layout cell. The grid rows are actually events. We can add periodical events to the grid. I don’t know wuts the mechanism of collecting these data as the lightbox do, and I found the lightbox can not be used independant of the scheduler.
Fortunately, I found the grid_view extension. But, I also found mylayout.cells(“a”).attachScheduler(new Date(),mode) could only add views of day, week and month, and when the mode is “grid” the scheduler won’t work properly, while if not in layout cell, initialized in the html markup as scheduler.init('scheduler_here",new Date(), “grid”), it works very well.
So how could I create a grid_view in a layout cell?
Thx in advance.

attachScheduler takes up to four arguments .attachScheduler(date, mode, container_id, scheduler)
which goes for

  • date - js date object, initial date in scheduler, current date by default
  • mode - initial mode name of the initial mode (“month”, “day”, “week”), “week” by default
  • container_id - id of html element of the scheduler
  • scheduler - configured instance of the scheduler

That means you can define a html markup for the scheduler, and add ‘grid view’ tab to it. Then you can configure the scheduler instance (add a grid view to it) and then attach it the the layout cell

scheduler.createGridView(...); layoutCell.attachScheduler(new Date(), 'grid', 'scheduler_here', scheduler);

Thank you for ur reply, Aliaksandr.
I tried ur solution, but when I add the “scheduler_here”, there’s outer duplicate buttons containing grid label, month,week and day labels. If I omit the third and fourth parameters, it works but the grid buttons are invisible, althouth the grid view appears.
Thus if I click the month, week or day button, I’m not able to back to the grid view.

TO: jyginger

I am curious, what does that look like on the client side?

here is the example (1 KB)

Hi, Jer
The page looks like below.

The javascript:

[code]myscheduler = mylayout.cells(“a”).attachScheduler(new Date(), “grid”, “scheduler_here”, scheduler);
myscheduler.load(“index.php?rids=18,19,20”, function() {

The html container:

<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
  <div class="dhx_cal_navline">
    <div class="dhx_cal_prev_button">&nbsp;</div>
    <div class="dhx_cal_next_button">&nbsp;</div>
    <div class="dhx_cal_today_button"></div>
    <div class="dhx_cal_date"></div>
    <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
    <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
    <div class="dhx_cal_tab" name="grid_tab" style="right:300px;"></div>
    <div class="dhx_cal_tab" name="grid1_tab" style="right:365px;"></div>
    <div class="dhx_cal_tab" name="grid2_tab" style="right:430px;"></div>

  <div class="dhx_cal_header">
  <div class="dhx_cal_data">

Hi, Aliaksandr,
I tried ur example, but still the grid button doesn’t appear. Does it show correctly on ur client?

I have checked the above sample and it does work for me.
Which version of scheduler and dhtmlx suite you are using ?

The versions are:
dhtmlxscheduler.js : std4.0,
dhtmlxscheduler_grid_view.js : std4.0
dhtmlxscheduler.css : std4.0
dhtmlxcontainder.js : pro3.6
dhtmlxlayout.js : std3.0
dhtmlxlayout_dhx_skyblue.css : std3.0


You need to use layout 3.6 or 4.0 to have the above described functionality.

Hi, Stanislav,
I have updated the layout version to Pro3.6, but the problem remains.
I tried to delete div tags one by one, until all the divs are deleted. It seems that these div tags have no effect on the scheduler display.

If it helps - I can send you the full working copy with dhtmlxscheduler and dhtmlxlayout ( standard edition )

Also, if you can - send me a PM with link to the problematic page.

Ok, thx in advance.
pls try and

It seems the old dhtmlxcontainer.js still used

I have attached the latest dhtmlxcontainer for 3.x codebase, try to use it instead of the existing one. (9.25 KB)

Dear Stanislav,
thank you so much.
Finally, it works.
I extracted the dhtmlxcontainer.js from one of the dhtmlx modules (version 3.6), and I always consider the version of all the files in it is 3.6.