Hi,
I have used the dhtml.dll, and set a custom lighbox.When the page renders the javascript is looked for at
sitename/scripts/dhtmlscheduler/ … heduler.js
Is there a waty to change this, as i assume it is set inside the dll./ The problem is that my site does not look like this and therefore my files are not working.
Regards
Hi,
you can define path to the scripts folder using DHXScheduler.Codebase property.
var sched = new DHXScheduler(this);
...
sched.Codebase = "url";
The default value is “/Scripts/dhtmlxScheduler”
Hi,
I have resolved this partially, but i still get the same issue with the Data action for the controller, is there a similar override for this?
Regards
scheduler generates URLs relative to the root of the site, but you can define custom ones.
to prevent auto-generating urls you need to initialize scheduler using default constructor
var sched = new DHXScheduler();
...
sched.DataAction = "data url";
sched.SaveAction = "save url";
sched.Codebase = "codebase url";
Apologies, but this is still now working.
The default it look for as the data action is
localhost/PartialViewInLightbox/ … eshift=-60
Where PartialViewInLightbox is the folder containing the Index and partial view for the lightbox, as well as the name of the controller. The code for this is
sched.DataAction = string.Format("Data?userId={0}", UserId);
Which, was taken from the example.
I tried to set the url to
sched.DataAction = string.Format("/Site2/User/SchedulerActivityMVC/Data?userId={0}", UserId);
This just gives a url of
localhost/PartialViewInLightbox/ … eshift=-60
What is the url that i should be putting into the code behind.
My topolgy consists of localhost, which is a parent site and beneath that site are site1 and site2
The sites are set up beneath the parent site.
Hi,
make sure you use default constructor when you create scheduler object
var sched = new DHXScheduler();// not DHXScheduler(this);
otherwise name of the controller will be added to the url.
and try use UrlHelper for your custom urls
sched.DataAction = Url.Content(string.Format("~/PartialViewInLightbox/Data?userId={0}", UserId));
Hi,
I have now got the dataction part to work but i am getting a 503 error for the externallightbox, which is added as
var box = sched.Lightbox.SetExternalLightbox("ActivitySchedulerMVC/LB", 500, 350);
hostname/ActivitySchedulerMVC/LB … 4060999912
I think the correct url should be
hostname/site/user/ActivitySched … 4060999912, but when i change the code to this
var box = sched.Lightbox.SetExternalLightbox("sire/user/ActivitySchedulerMVC/LB", 500, 350);
I get a message referring to the index call for the parent page
The parameters dictionary contains a null entry for parameter ‘UserId’ of non-nullable type ‘System.Int32’ for method ‘System.Web.Mvc.ActionResult Index(Int32)’ in ‘SchedulerTest.Controllers.PartialViewInLightboxController’. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters.
I am not sure what is causing this issue.
you can also use url helper for SetExternalLightbox
sched.Lightbox.SetExternalLightbox(Url.Content("~/ActivitySchedulerMVC/LB", 500, 350);
note that lightbox methods renders url without any changes, on the client-side request will go to the very same url as you’ve specified
since your lightbox’s request goes to the index, there must be something wrong with routing or url
Hi,
I have used the url.content encoding, but i get a failure to resolve the dns message back when it loads the control into the lightbox form.