Hi i was looking to Bind Dhtmlx Lightbox combo select with the values from Database… I’m using DHTMLX standard edition and added required JS and CSS file. Here is my MVC controller
public JsonResult BindActivity()
{
var lstTaskSchedule = new SelectList(new[]
{
new { key=“1”, label=“Hello 1”},
new { key=“2”, label=“Hello 2”},
new { key=“3”, label=“Hello 3”},
new { key=“4”, label=“Hello 4”},
}, “key”, “label”, 1);
return Json(lstTaskSchedule, JsonRequestBehavior.AllowGet);
}
Here is my Jquery code
var Activity = scheduler.load("/TaskScheduler/BindActivity");
scheduler.config.lightbox.sections = [
{ name: “text”, height: 100, map_to: “text”, type: “textarea”, focus: true }, //Here it is a textbox
{ name: “Activity”, options: Activity, map_to: “Activity”, type: “combo”, image_path: “…/Content//DHTMLX/imgs/”, height: 30, filtering: true }, //Here i’ve created Select for Activity Type
{ name: “time”, height: 72, type: “time”, map_to: “auto” } //This will show time period
];