This is a migrated thread and some comments may be shown as answers.

Different custom editor templates for mobile and desktop

1 Answer 152 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 21 Sep 2018, 11:06 AM

 Hi

 

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?

 

Thanks

Steve

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 25 Sep 2018, 08:32 AM
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.

Regards,
Neli
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.
Tags
Scheduler
Asked by
Steve
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or