Multiselect

 
requires ext/dhtmlxscheduler_multiselect.js

Depending on your needs you can place multiselect checkboxes horizontally or vertically, use static or dynamic loading.

{ name:"fruitselect", 
  height:100, 
  map_to:"fruit_id", 
  type:"multiselect", 
  options: scheduler.serverList("fruit_id"), 
  script_url: 'php/events_multiselect_options.php', 
  vertical:"true"
},
  • name - the editor's name
  • height - the height of an editor
  • map_to - the property maped to an editor
  • type - the editor's type
  • options - the elements that will be represented in an editor
  • script_url - url containing options data
  • vertical - vertical placement

Some words about loading.
In static case, all event parameter options store as an individual field in the database and you can use this field for building your own logic later. It gives additional possibilities but forces to make more queries for loading all the options.
In dynamic case, nothing additional is stored. Options are loaded as necessary. It decreases amount of queries but disables building any logic.

On server side you need to have code similar to next

	require_once ('../../../codebase/connector/scheduler_connector.php');
	require_once('../../../codebase/connector/crosslink_connector.php');
	require_once ('../../common/config.php');
 
	$res=mysql_connect($server, $user, $pass);
	mysql_select_db($db_name);
 
	$cross = new CrossOptionsConnector($res);
	$cross->options->render_table("user","user_id","user_id(value),username(label)");
	$cross->link->render_table("event_user","event_id", "user_id,event_id");
 
	$scheduler = new SchedulerConnector($res);
	$scheduler->set_options("user_id", $cross->options);
	$scheduler->render_table("events_ms","event_id","start_date,end_date,event_name,details");

As you can see, it differs from default init by next options

  • cross-link connector php file is included
  • CrossOptionsConnector connector initialized, it takes two tables, one - where options stored, second - where relations stored.
  • set_options used to link cross-link connector to the scheduler