We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Using the JavaScript controls with MS Lightswitch

Thread ID:

Created:

Updated:

Platform:

Replies:

115994 Mar 12,2014 11:34 AM Mar 24,2014 02:09 AM JavaScript 3
loading
Tags: General
John Burgin
Asked On March 12, 2014 11:34 AM

Hi,

I'm looking for some guidence to use the JavaScript controls in Lightswitch. Specificly the changes needed to the default.htm, how best to include the assets folder into a project (and what is the minimum needed), how to attach event handers and finally two way binding. 

Thanks,
John
P.S. I also posted the question on the lightswitch forum here.

Harikrishnan P [Syncfusion]
Replied On March 13, 2014 10:17 AM

Hi John,

Currently we do not have official support for using JS framework in Lightswitch Environment. We will provide official support for using JS framework in Lightswitch in any of our upcoming release.

Please be patience until then.

Query1: how best to include the assets folder into a project (and what is the minimum needed)

Answer: Minimum files needed from the folders present inside the assets folder.

1)      CSS – ej.widgets.core.css and ej.theme.css file present in the default-theme folder applies the default theme for the JS contols. If you need other themes, you can use the ej.widgets.core.css and ej.theme.css files from the corresponding gradient or flat themes folders. The common-images folder (css -> web -> common-images) is necessary as we refer the icons needed for our JS controls.

2)      External – JQuery 1.10.2.min is and Jquery.easing-1.3.min file are needed. Other files that needs to be included is based on your requirement.

3)      Scripts – ej.widgets.all.min file includes the scripts of all JS controls. So this file alone can be included.

Query2: how to attach event handers

Answer: Event handler for our controls can be used like below,

For example to use the click event handler of our button control code as below,


          

           //create event for button

            $("#button1").ejButton({

                create: function (args) {

 // args.cancel   - returns the cancel option value

              // args.model    - returns the button model

              // args.type     - returns the name of the event

                         //handle the event

}

});       

 

Query3: two way binding

Answer: At present we have not provided two way binding support of Knockout JS. We have planned to provide this feature in our upcoming release.

Kindly get back to us if you have further queries.


Regards/Thanks,

HariKrishnan.


John Burgin
Replied On March 21, 2014 04:59 AM

Hi,

Thanks for the reply.  I'll give the code a try.

An official Lightswitch version is very interesting! 

Thanks, 
John

Harikrishnan P [Syncfusion]
Replied On March 24, 2014 02:09 AM

Hi John,

We will update you, once we provide an official support for our JS controls in Lightswitch.

We appreciate your patience until then.

Please let us know if you have further queries.

Regards,

HariKrishnan.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;