是否可以为dhtmlx调度程序提供两个gridviews?

时间:2015-03-04 14:55:39

标签: html gridview scheduler dhtml

我尝试使用dhtmlx调度程序库显示两个网格视图。我们使用调度程序的方式是让员工可以注销。现在,我们可以将其视为月度视图,但我们也希望有一个日视图。

我能够创建网格,但是当我尝试单击按钮时,它不会显示日期报告。

以下是代码段

                    scheduler.locale.labels.grid_tab = "Month";

                    scheduler.createGridView({
                       name:"grid",
                       fields:[     // defines columns of the grid
                             {id:"date", label:'Date', sort:'date', width:300, align:"left"},
                             {id:"employee",   label:'Employee',   sort:'str',  width:400, align: "*"},
                             {id:"room_description", label:'Destination', sort:'str',  width:600, align:'left'}
                       ],
                        paging:true,
                        unit:"month",
                        step:1




                });


                    scheduler.locale.labels.grid_tab2 = "Day Report";   
                scheduler.createGridView({
                       name:"day_grid",
                       fields:[     // defines columns of the grid
                             {id:"date", label:'Date', sort:'date', width:300, align:"left"},
                             {id:"employee",   label:'Employee',   sort:'str',  width:400, align: "*"},
                             {id:"room_description", label:'Destination', sort:'str',  width:600, align:'left'}
                       ],
                        paging:true,
                        unit:"day",
                        step:1

                });

1 个答案:

答案 0 :(得分:0)

您的代码似乎适用于调度程序演示 http://docs.dhtmlx.com/scheduler/snippet/b9320394

唯一需要正确定义day_grid视图的标签,该变量应命名为" day_grid_tab"而不是" grid_tab2" scheduler.locale.labels.day_grid_tab ="日报告&#34 ;;

相关问题