Is there an dhtmlxSchedulerConnector (.net) to populate the sections in timeline view?
If not, what is the alternative to populate the sections?
Ok, I’ve tried this.
I get the event data for scheduler but no options (=sections) in timeline view.
schedulerConnector.ashx.cs:
...
public class schedulerConnector : dhtmlxRequestHandler
{
public override IdhtmlxConnector CreateConnector(HttpContext context)
{
dhtmlxSchedulerConnector dhtmlxschedulerconnector = new dhtmlxSchedulerConnector(
"events",
"id",
dhtmlxDatabaseAdapterType.SqlServer2005,
"Data Source=...",
"start_date",
"end_date",
"text, event_location"
);
dhtmlxOptionsConnector dhtmlxoptionsconnector = new dhtmlxOptionsConnector(
"mitarbeiter",
"rid",
dhtmlxDatabaseAdapterType.SqlServer2005,
"Data Source=...",
"name"
);
dhtmlxschedulerconnector.AddOptionsConnector("sections", dhtmlxoptionsconnector);
return dhtmlxschedulerconnector;
}
...
Table mitarbeiter:
rid (primary key integer), name varchar(30), …
testWebsite.html:
...
<script type="text/javascript">
...
var sections=[];
...
scheduler.createTimelineView({
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30,
x_size: 24,
x_start: 14,
x_length: 48,
y_unit: sections,
y_property: "rid",
render:"bar"
});
...
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"event", height:43, map_to:"event_location", type:"textarea"},
{name:"section", height:23, map_to:"rid", type:"select", options:sections},
{name:"time", height:72, type:"time", map_to:"auto"}
];
...
scheduler.load("schedulerConnector.ashx");
...
What is wrong?
Ok, I’ve found it:
scheduler.serverList(“sections”) instead of sections.
...
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"event", height:43, map_to:"event_location", type:"textarea"},
{name:"section", height:23, map_to:"rid", type:"select", options:scheduler.serverList("sections")},
{name:"time", height:72, type:"time", map_to:"auto"}
];
...
scheduler.createTimelineView({
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30,
x_size: 24,
x_start: 14,
x_length: 48,
y_unit: scheduler.serverList("sections"),
y_property: "rid",
render:"bar"
});
...