meula
September 10, 2013, 7:00pm
#1
This code ,
@Html.Raw(Model.GenerateLinks())
generate links of navigation bar.
But if I want to set my own navigation bar buttons?
I have tried to comment the generateLinks line and code the buttons I need, but it doesn’t work.
[code]
<div class='dhx_cal_prev_button'> </div>
<div class='dhx_cal_next_button'> </div>
<div class='dhx_cal_today_button'></div>
<div class='dhx_cal_date'></div>
<div class='dhx_cal_tab' name='day_tab' style='left:204px;'></div>
<div class='dhx_cal_tab' name='workweek_tab' style='left:268px;'></div>
[/code]
meula
September 10, 2013, 7:13pm
#2
I’ve checked you can remove and add views:
sched.Views.Clear();
sched.Views.Add(new DayView() { Label = "Day" });
sched.Views.Add(new WorkWeekView(){Label = "Work Week" });
But, custom buttons like “Allow drag & resize”, “skip to date [x]”, etc… How?
meula
September 10, 2013, 7:24pm
#3
And how to set default view?
Thanks
nicck
September 11, 2013, 6:26am
#4
scheduler.InitialView = “viewname”;
meula
September 11, 2013, 9:34am
#5
Thanks!!
Is it possible to include your own buttons in navigation bar?
meula
September 11, 2013, 10:06am
#6
Sorry, but it doesn’t works:
sched.Views.Add(new DayView() { Label = "Día",Name="Dia" });
sched.Views.Add(new WorkWeekView(){Label = "W-Week",Name="Semana" });
sched.InitialView = "Dia";
meula
September 11, 2013, 10:18am
#7
It works, but if you get de default view name, can not initalize it.
sched.Views.Add(new DayView() { Label = "Día"});
sched.InitialView = "day";
But not,
sched.Views.Add(new DayView() { Label = "Día", Name="Dia"});
sched.InitialView = "Dia";
nicck
September 11, 2013, 11:36am
#8
yes, u need to add the default name of that view
Yes it is possible to add your own buttons to change the views:
try this on click event of a button to display weekview
sched.setCurrentView(new Date(), "week");