radscheduler client side navigation commands

3 posts, 0 answers
  1. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 08 Jul 2014 Link to this post

    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. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 11 Jul 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 11 Jul 2014 in reply to Plamen Link to this post

    Thanks Plamen, it worked.
Back to Top