DHTMLX Scheduler data "collections"

Is there any way to access the <coll_options> element from a DHTMLX data source? In DHTMLX Scheduler we use this for resources lists, and for creating menus in the lightbox. I’d like to use them in Mobile Scheduler to show menus in the Edit window.

Thanks

Ken

Hello Ken,

Webix Scheduler does not export elements from dhtmlx. However, it is possible to customize “Edit form” of Scheduler. And you can add a select control if it is needed:

scheduler.config.form = [
    {view:"text", label:"Event", labelWidth: 100, id:"text", name:'text'},
    {view:"datetext",	label:"Start", labelWidth: 100,	id:'start_date',name:'start_date', dateFormat:scheduler.config.form_date},
    {view:"datetext",	label:"End", labelWidth: 100,	id:'end_date',name:'end_date', dateFormat:scheduler.config.form_date},
    {view:"checkbox",	id:'allDay', name:'allDay', label: "All-day", labelWidth: 100,  value:0},
    //custom section in form
     {view:"richselect",	 label:"Resources", id:'resources', name:"resources", labelWidth: 100, options: [
          {id: "a", value: "resource 1"},
          {id: "b", value: "resource 2"}
     ] }
];

webix.ready(function(){
	webix.ui.fullScreen();
	webix.ui({
		view: "scheduler",
		id: "scheduler"
	});
	$$("scheduler").load(...);
});

In your reply, you show me a inline options array.

"
options: [
{id: “a”, value: “resource 1”},
{id: “b”, value: “resource 2”}
]
"

Our options array comes from our data feed and can’t be hard-coded into the form. It is created dynamically depending on the data. Is there any way to access this part of the data feed? We used to do it when the mobile toolkit was part of DHTMLX, but I don’t remember how.

You can define url as “options” property of the richselect:

http://docs.webix.com/api__ui.richselect_options_config.html

Oh cool - I didn’t see that.

If we’re sending several arrays through the URL, can we parse the contents of the URL to pull just one array?

Options can be added dynamically to popup list:

http://webix.com/snippet/631acdc3