Articles in this section
Category / Section

How to avoid showing unused template in the page while defining the template for Listbox with respect to rendermode?

1 min read

In order to avoid showing the unused template in the page you need to define it under the script tag. You can refer to the following code example.

HTML

<div data-role="ejmlistbox" id="templatelist" data-ej-rendertemplate="true">

</div>

<script id="default" type="text/jsrender">

Default Template

</script>

<script id="android" type="text/jsrender">

Android Specific Template

</script>

 Script

<script>

    $(function () {

        ej.isAndroid() ? $('#templatelist').ejmListbox({ templateId: 'android' }) : $('#templatelist').ejmListbox({ templateId: 'default' });

    });

</script>

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied