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

radscheduler client side navigation commands

2 Answers 105 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Prava kafle
Top achievements
Rank 1
Prava kafle asked on 08 Jul 2014, 07:20 PM
Hi,
do we have radscheduler navigation commands similar to this "http://www.telerik.com/help/aspnet-ajax/scheduler-navigationcommand.html" for client side.
I am using  following information to decide which navigation command was fired.
Unfortunatley  "more" in  "MonthView" and "click" on "Today" button  both fire command "8". How do I differentiate between the two especially in Month View?

 function OnClientNavigationComplete(sender, eventArgs) {
                 var command = eventArgs.get_command();

                 /*
                    8 - > Today
                    6 --> NextDay
                    7-->PreviousDay
                    12 --> pop Up calendaer selectdDate
                 */


                 var selectedView = sender.get_selectedView();
                 var targetDate = sender.get_selectedDate();
                 if(targetDate)
                     targetDate = targetDate.toDateString();
                 console.log("OnClientNavigationComplete" + ", targetDate: " + targetDate + ", command: " + command);

                doCustomAction( targetDate, command);
                   
             }


Thanks,
Prava

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 11 Jul 2014, 12:03 PM
Hi Prava,

Here is one way how you can differentiate if "More" button is clicked or not:
var showMoreClicked = false;
       function OnClientDataBound(sender) {
 
           var $ = $telerik.$;
          
           $(".rsShowMore").click(function myfunction() {
               showMoreClicked = true;
           });
       }
 
       function OnClientNavigationComplete(sender, args) {
           var command = args.get_command();
 
           if (command == 8) {
                
               if (showMoreClicked) {
                   alert("showMoreClicked");
               }
               else {
                   alert("not showMoreClicked");
               }
           }
       
           showMoreClicked = false;
       }

Hope this will be helpful.

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Prava kafle
Top achievements
Rank 1
answered on 11 Jul 2014, 01:45 PM
Thanks Plamen, it worked.
Tags
Scheduler
Asked by
Prava kafle
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Prava kafle
Top achievements
Rank 1
Share this question
or