Check documentation for the latest version of dhtmlxSuite Select-Box Columns in Scheduler DHTMLX Docs

Select-Box Columns in Scheduler

When Scheduler has a select-like collections or unit/timeline view, it's possible to load a list of related options from a server. In such a case data loading needs to be defined on the client side as:

some_collection=scheduler.serverList("type");

On the server side, a list of options can be retrieved in 2 ways:

  • a hardcoded list
//both values and labels need to be provided
//value=>label
$scheduler->set_options("type",array("1"=> "one", "2"=>"two","3"=> "three")); 
$scheduler->render_table("events","event_id","start_date,end_date,text,type_id");
  • a list created on the base of a different table
$options = new OptionsConnector($res);
//there must be two fields selected: one as (value), second as (label)
$options->render_table("types","type_id","type_id(value),type_name(label)");
$scheduler->set_options("type",$options);
 
$scheduler->render_table("events","event_id","start_date,end_date,text,type_id");
Back to top