hi,
I have downloaded sample project for asp.net 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”;
}
Hi,
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.
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 docs.dhtmlx.com/doku.php?id=dhtm … nt_onclick
scheduler.attachEvent("onClick", function (event_id){
var ev = scheduler.getEvent(event_id);
//do something with the schedule
});
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?
hi,
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;
sched.Extensions.Add(SchedulerExtensions.Extension.PDF);
//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())
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
And thats pretty it,
also you may need helpers to convert date to string and vice versa:[code]var dateToString = scheduler.date.date_to_str("%d-%m-%Y %H:%i");
var string = dateToString(event.start_date);
var stringToDate = scheduler.date.str_to_date("%d-%m-%Y %H:%i");
var date = stringToDate(string);[/code]Here is some info about date formats docs.dhtmlx.com/doku.php?id=dhtm … ngs_format
hi,
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.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan