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.

Lightswitch with Javascript controls

Thread ID:

Created:

Updated:

Platform:

Replies:

115978 Mar 10,2014 11:32 AM Mar 21,2014 12:14 AM LightSwitch Silverlight 3
loading
Tags: General
John Burgin
Asked On March 10, 2014 11:32 AM

Hi,

I'm trying to use your Javascript controls in MS Lightswitch and I'm struggling.  I know Lightswitch well, but I'm a beginner at Javascript so I'm probably missing some simple steps.   Does anyone have some examples or a basic guide? 

Kind Regards,
John

Lingaraj S [Syncfusion]
Replied On March 17, 2014 11:46 PM

Hi John,

 

Regret for the delay,

 

Please find the sample from following location to use our JS control  in LightSwitch HTML Client application.

http://www.syncfusion.com/downloads/support/directtrac/119339/Application4509113360.zip

 

Please let me know if you have any concerns.

 

Regards,

Lingaraj S.


Xander van der Merwe
Replied On March 20, 2014 10:39 PM

The example project does not show how to actually bind the ejDatepicker to the contentItem and the rendering of the date picker field is also not looking quite right.

Here is a working example of rendering a datepicker for a "StockDate" column of type DateTime that was added to the example Products table:

myapp.AddEditProducts.StockDate_render = function (element, contentItem) {
    // add the data-role='none' to prevent jQueryMobile from messing with the control rendering
    var date = $("<input data-role='none' id='datepicker' type='text'/>");
    date.appendTo($(element));

    date.ejDatePicker({
        // set the control value to the contentitem value:
        "value": contentItem.value,
        change: function (args) {
            // update the content item when the value changes:
            contentItem.value = args.value;
        },
    });
};

ps. the online help documentation for the ejDatePicker control here http://help.syncfusion.com/js is incorrect. It states that the event to hook into for a new date being selected is the "dateSelected" event when it should in fact be the "change" event, similar to the ejDateTimePicker.

Xander van der Merwe
Replied On March 21, 2014 12:14 AM

Also see this LightSwitch forum thread where I showed an example of using the ejCheckBox as well:


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.

;