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

Checking the view in javascript

2 Answers 33 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Teena
Top achievements
Rank 1
Teena asked on 28 Feb 2013, 08:11 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 28 Feb 2013, 09:01 AM
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.
0
Accepted
Princy
Top achievements
Rank 2
answered on 28 Feb 2013, 11:52 AM
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.
Tags
Scheduler
Asked by
Teena
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Princy
Top achievements
Rank 2
Share this question
or