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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

LightSwitch Integration

Thread ID:





118315 Feb 24,2015 07:22 PM UTC Mar 2,2015 07:17 AM UTC JavaScript 5
Tags: ejNavigationDrawer
Stefano Bottaro
Asked On February 24, 2015 07:22 PM UTC

Hi to all,
I'm integrating your NavigationDrawer in my Main menù of an HTML5 LightSwitch application.
How can I to call my internal page from Drawer? below a piece of code:
i've create a js function
function createMenu() {
        $("#navpane").ejNavigationDrawer({ type: "overlay", direction: "left", enableListView: true, listViewSettings: { width: 200, mouseDown: 'slideMenuClick' }, position: "fixed" });
        function slideMenuClick(e) {
            $("#container .subpage").hide();
            $("#" + e.text.toLowerCase()).show();
            $(".e-header h2").text(e.text);
        $("#butdrawer").click(function () {

in my default page I have....
  <!--Navigation Drawer Control-->
                        <div id="navpane">
                                <li data-ej-imageurl="Content/Images/00House.png" data-ej-text="Home"
                                <li data-ej-imageurl="Content/Images/01People.png" data-ej-text="Clienti"
                                <li data-ej-imageurl="Content/Images/02Project.png" data-ej-text="Prodotti"
                                <li data-ej-imageurl="Content/Images/08Clock.png" data-ej-text="Appuntamenti"
                                <li data-ej-imageurl="Content/Images/12Resources.png" data-ej-text="Risorse"
                                <li data-ej-imageurl="Content/Images/05Graph.png" data-ej-text="Statistiche"
                                <li data-ej-imageurl="Content/Images/06Configuration.png" data-ej-text="Configurazione"
tks in advance

Arun Kumar S [Syncfusion]
Replied On February 25, 2015 11:47 AM UTC

Hi Stefano,

Thanks for your interest in Syncfusion products.

Please follow the steps described in the below link to achieve your requirement.

UG Link: http://help.syncfusion.com/ug/js/default.htm#!documents/createyourfirstnavig.htm

We have created a simple sample for the same and attached in the link below.

Sample Link: NavigationDrawer.zip

Please check this and let us know if you need any further assistance.

Arun Kumar S

Stefano Bottaro
Replied On February 25, 2015 07:32 PM UTC

Tks Arun,
now i need to call  my internal page...... something about:
http://localhost:50512/HTMLClient/#/BrowseCustomers/[e15999] .....this url is dinamicaly composed by framework html5 Lightswitch
can you help me ?

Arun Kumar S [Syncfusion]
Replied On February 26, 2015 07:09 AM UTC

Hi Stefano,

Thanks for the update.

Yes, We can navigate to the internal page by using ajax. You could find the below steps to achieve your scenario.

First, we have to create an internal pages from which we are going to get the content while clicking the items in the drawer. Once, we have done with creating pages we can render navigation drawer with mousedown event to handle the ajax post as in below the code snippets below.


<div class="navi">

        <div id="target" class="icon-target">




    <div id="navpane">


            <li data-ej-imageclass="icon-home" data-ej-text="Home"></li>

            <li data-ej-imageclass="icon-profile" data-ej-text="Profile"></li>

            <li data-ej-imageclass="icon-photo" data-ej-text="Photos"></li>

            <li data-ej-imageclass="icon-locations" data-ej-text="Location"></li>



    <!-- Default Page Content-->

    <div id="render">

        This page displays the content of the item in drawer on click.


    <script type="text/javascript">

        $(function () {

            $("#navpane").ejNavigationDrawer({ enableListView: true, targetId: "target", listViewSettings: { mouseDown: 'slideMenuClick', persistSelection: true } });



Now, we have to handle $.ajax() function to load the internal page content to the current page. Please find the below code snippets.


function slideMenuClick(args) {


                url: "ajaxpages/" + args.text + ".html", //To get internal page url

                type: "POST",

                success: function (e, status, response) {

                    //Success handler of content loading while list click happens


                    $('#target').html(args.text);//To change the header based on the internal page content



                error: function (error) {





For your convenience, We have created a simple sample and attached it in the below link.

Sample Link: Sample.zip

Please check this and let us know if you need further assistance.
Arun Kumar S

Stefano Bottaro
Replied On February 28, 2015 06:35 PM UTC

Tks for your assistence, I 've modified the  slideMenuClick function .
Below the row updated for Lightswitch implementation

function slideMenuClick(args) {
    switch (args.text) {
        case "Home":
            scr = "DashBoard";                                //the  Lightswitch screen neme
    msls.application.showScreen(scr, null, null);    // this row is most important ............. compose the url in LS format

thank to all for the great work
I'll come back alive with new requests for clarification on the other components that I'm testing
have you a god day

Arun Kumar S [Syncfusion]
Replied On March 2, 2015 07:17 AM UTC

Hi Stefano,

Thanks for the update. We will wait to hear from you.
Arun Kumar S


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon