Checking the view in javascript

3 posts, 2 answers
  1. Teena
    Teena avatar
    16 posts
    Member since:
    Feb 2013

    Posted 28 Feb 2013 Link to this post

    Hello,

    How can we check if the currently selected view of Radscheduler is Day view using JavaScript? Can anyone provide the JS code to check this condition?

    Thanks,
    Teena
  2. Answer
    Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 28 Feb 2013 Link to this post

    Hi Teena,

    You can refer to this help topic where such example is provided for the get_selectedView property.

    Hope this will be helpful.


    Regards,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Feb 2013 Link to this post

    Hello Teena,

    You can use get_SelectedView property to determine whether the selected view is Day view. Please have a look at the following JavaScript in which the condition is checked.

    JavaScript:
    function checkSchedulerView()
    {
        var scheduler = $find('<%=RadScheduler1.ClientID %>');
        if (scheduler.get_selectedView() == Telerik.Web.UI.SchedulerViewType.DayView)
        {
            //write the necessary code to perform the desired operation.
        }
    }

    Thanks,
    Princy.
Back to Top