Current seelcted view

4 posts, 0 answers
  1. rahul
    rahul avatar
    4 posts
    Member since:
    Aug 2017

    Posted 17 Aug Link to this post

    I need to know a way to find out the current selected view in the scheduler and grab that into a javascript object.
  2. Nencho
    Admin
    Nencho avatar
    1645 posts

    Posted 18 Aug Link to this post

    Hello Rahul,

    In order to get the currently selected view on the Scheduler, you should first get a reference to the scheduler widget and then use its view() method. This will return an object (type: kendo.ui.SchedulerView), representing the currently selected view. Once of the properties of this object, is the name which should suite your scenario:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler#methods-view

    In the example below. you can observe the usage of the above-suggested approach (click "show selected view" button)

    https://dojo.telerik.com/ecuke/4

    Hope this would help.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. rahul
    rahul avatar
    4 posts
    Member since:
    Aug 2017

    Posted 24 Aug in reply to Nencho Link to this post

    I am using angular 1.6. So what is my reference to the scheduler widger in my case?
  4. Nencho
    Admin
    Nencho avatar
    1645 posts

    Posted 25 Aug Link to this post

    Hello Rahul,

    In Angular scenario you can still use the Client API of the widgets. Hence you only need to subscribe for the click event of the button:

    <kendo-button class="k-primary" ng-click="onClick1()">Get Selected View</kendo-button>

    In the modified dojo example below, you can observe this implementation:

    http://dojo.telerik.com/@nenchef/ALOCo/2

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top