double click event in mvc schedule

I have downloaded sample project for mvc4 scheduler.
What I want is,If user double click on the schedule,I don’t want to display the Lightbox,How can I define this in my view page and in which action I have to define it?
Index.cshtml in" MVCFormInLIghtBox",I have defined like
ViewBag.Title = “Scheduler | MVC Form in lightbox”;
ViewBag.SampleTitle = “MVC Form in lightbox”;
ViewBag.ShortDescription = “Custom lightbox form”;
ViewBag.LongDescription = “Try to edit event”;

alert(“In light box script”);
alert(“In double click”);
return true;

<style type="text/css">



In this Dbl click event is not firing,even alert is also not can I fire this event as well as I don’t want to show the lightbox.

if you want to disable event creation on double-click, you could use related config
DHXScheduler.Config.dblclick_create = false;
or to prevent opening lightbox on double click on event:
DHXScheduler.Config.details_on_dblclick = false;

As for custom code, it will work if you place it after Model.Render()
Currently it’s being executed before scheduler is loaded to the page and causes js error.

Thanks for the reply,

If i gave like this,This is showing DHXscheduler is not defined.
Actually my requirement is,
I have a left tab and right tab,
In the left tab I have a scheduler,when I double click on a particular schedule,I have to display the details of that schedule on the right side tab.
can u provide a sample code for this.


If i gave like this,This is showing DHXscheduler is not defined.
I meant DHXscheduler class. You should change config of the scheduler in the controller
e.g:public virtual ActionResult Index() { var scheduler = new DHXScheduler(this); scheduler.Config.dblclick_create = false;

In the left tab I have a scheduler,when I double click on a particular schedule,
I have to display the details of that schedule on the right side tab.
check scheduler’s onClick event, you can use it to catch click on a schedule … nt_onclick

scheduler.attachEvent("onClick", function (event_id){ var ev = scheduler.getEvent(event_id); //do something with the schedule });

Onclick event is not firing.
I gave like
scheduler.attachEvent(“onClick”, function () {
alert(“In onclick”);

please provide the full code. There is no known problems with inner events of the scheduler.
Code from your first post didn’t work because scheduler.attachEvent was called before scheduler was defined on the page. Is there any chance that the same is happening with your current code?

I have sent the code in the following attachment.and can u provide sample code for my requirement as described above.
controller code:
public ActionResult Index()
var sched = new DHXScheduler(this);
sched.Skin = DHXScheduler.Skins.Terrace;
sched.Config.multi_day = true;
sched.InitialDate = new DateTime(2011, 9, 19);
sched.Config.dblclick_create = false;
sched.Config.details_on_dblclick = false;
//load data initially
sched.LoadData = true;
//save client-side changes
sched.EnableDataprocessor = true;
return View(sched);
public ActionResult Data()
return View();

view code:

@{ ViewBag.Title = "Scheduler | Basic initialization"; ViewBag.SampleTitle = "Basic initialization"; ViewBag.ShortDescription = "See how scheduler can be initialized"; ViewBag.LongDescription = "Drag or double-click to create new event Double-click on existing events to edit them, or drag them to change their time."; } @Html.Raw(Model.Render())
            Description:<input type="text" />

    $(document).ready(function () {
        var tabbar = new dhtmlXTabBar("a_tabbar", "right");
        tabbar.addTab("a1", "EditSchedule", "100px");
        tabbar.setContent("a1", "content");
        scheduler.attachEvent("onClick", function () {
            alert("In onclick");

Here is the example,
‘onClick’ event seems working here …

To link calendar with form, you’ll need following methods of the scheduler:
New event can be created with scheduler.addEvent method: … r_addevent

To retrieve existing event by id(which is passed to ‘onClick’ handler), you should use scheduler.getEvent[code]scheduler.attachEvent(“onClick”, function(id){
var event = scheduler.getEvent(id);
//fill form with event data

If you updating event with data from the form, you should use scheduler.updateEvent to redraw event in the calendar:var event = scheduler.getEvent(id); event.text = "new text"; scheduler.updateEvent(id);

And thats pretty it,
also you may need helpers to convert date to string and vice versa:[code]var dateToString ="%d-%m-%Y %H:%i");
var string = dateToString(event.start_date);

var stringToDate ="%d-%m-%Y %H:%i");
var date = stringToDate(string);[/code]Here is some info about date formats … ngs_format

It is working fine,
I need two more things,
1.If there is no schedule and user double click on specific time,I need to active the right tab .
user enters the values and click on save,I need save it in database.
2.Is it possible to create schedule within schedule.