Different custom editor templates for mobile and desktop

2 posts, 0 answers
  1. Steve
    Steve avatar
    1 posts
    Member since:
    Sep 2018

    Posted 21 Sep 2018 Link to this post



    I want to be able to display two different editor templates for desktop and mobile devices.  The template for mobile devices should contain less fields as it will be used by field based engineers.  The desktop version will contain more information about the appointment details.


    I found this thread from 2014 https://www.telerik.com/forums/mobile-compatibility-for-customeditortemplate but no example was provided to show how to achieve this. 


    Has anyone come across this?




  2. Neli
    Neli avatar
    395 posts

    Posted 25 Sep 2018 Link to this post

    Hello Steve,

    You could use the kendo.support.mobileOS field to check if the devise is mobile. In case the application runs on desktop, the value will be false.
    Below is an example of the eventTample configured depending on the device:
    eventTemplate: kendo.support.mobileOS ? $("#event-template2").html() : $("#event-template").html(),

    Here is also a Dojo example where the described approach is used. Also a screencast which demonstrates that different templates are rendered on desktop and when an Ipad is selected in the emulator.

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top