Visual Studio LightSwitch HTML Client

Would it be possible to use the scheduler component with a LightSwitch HTML client?

If so, is there any guidance or examples that can be followed?

Thanks,

Chris

There is no any samples, and I didn’t try to do it itself - but scheduler must work in any environment where modern browser component is used and javascript is allowed.

Thank you for the reply Stanislav.

As you suggested we’ve been able to successfully implemented the version 4.0.0 DHTMLX.Scheduler NuGet package and we’re very impressed with the results within the latest version of Microsoft’s LightSwitch framework - it’s a great scheduling control and the one we’re keen to use in our project.

Unfortunately, having updated to the 4.1.0 version you released on NuGet yesterday, we’re now encountering a show-stopping exception :frowning:

If I provide a sample Visual Studio 2013 LightSwitch project which demonstrates the problem would you be in a position to investigate?

Thanks in advance,

Chris

Hello Chris,
Thanks for reporting the issue!
Please provide the example, we’ll investigate the problem
(you can post it here or send me a PM)

Thanks Aliaksandr - I’ll send across a simplified example as soon as possible.

Having side-by-side debugged the version 4.0.1 and 4.1.0 code the problem appears, at first glance, to be caused by the following new code in the scheduler.init function: -

	if(this._obj){
		this.unset_actions();
		this._obj.innerHTML = ""; // Removing this line avoids the crash 
	}

	this._obj=(typeof id == "string")?document.getElementById(id):id;

The problem is solved if I remove the line of code with the comment against it.

With this line of code, the following exception occurs when navigating back to the LightSwitch screen hosting the schedule control: -


The following shows the line of code where the exception occurs and the empty _els array in the watch window: -


Just in case it’s significant, I’m using the jQuery integration approach.

I appreciate your help and will send across the example project shortly.

Thanks,

Chris

Also, just to add that, when navigating back in the LightSwitch HTML client app (to the screen hosting the scheduler control) this._obj is already set to the same entity passed into the function via the id parameter.

This results in the following statement (part of the new code in the scheduler.init function) having no impact, and the preceding clear of this.obj.innerHTML leading to an empty array of elements in the onTemplatesReady event function (where the exception occurs): -

this._obj=(typeof id == "string")?document.getElementById(id):id;

Thanks,

Chris

Hi,
please try the attached version of dhtmlxScheduler codebase. Does it fixes the issue?
dhtmlxScheduler_v4.1.0.zip (619 KB)

Hi Aliaksandr,

Whilst I’ll do more extensive testing tonight, at first glance it does appear to have fixed the issue :slight_smile:

Thank you for your efforts and kind regards,

Chris