PopUp in RadScheduler

6 posts, 0 answers
  1. Pablo
    Pablo avatar
    2 posts
    Member since:
    Nov 2012

    Posted 28 Feb 2013 Link to this post

    Hello, our company is recently tested products telerik rad scheduler and specifically the need to know if this control can make calls to pop up an external page to insert, edit and delete data, because each process has too many validations directly the database that must be handled by codebehind and for us is very important to use this work scheme.

    sorry for
    my bad English
    thanks

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Feb 2013 Link to this post

    Hello Pablo,

    One suggestion is you can open a RadWindow from client side on clicking the RadScheduler time slot and set the NavigateUrl property to your external page. Please have a look at the following code.

    ASPX:
    <telerik:RadScheduler ID="RadScheduler1" runat="server" OnClientTimeSlotClick="OnClientTimeSlotClick"
        DataEndField="End" DataKeyField="ID" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
        OnClientAppointmentClick="openAdvancedForm" DataStartField="Start" DataSubjectField="Subject"
        OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentInsert="RadScheduler1_AppointmentInsert"
        OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnFormCreated="RadScheduler1_FormCreated"
        SelectedView="WeekView" StartEditingInAdvancedForm="true" StartInsertingInAdvancedForm="true">
        <AdvancedForm Modal="True" />
    </telerik:RadScheduler>
    <telerik:RadWindow ID="RadWindow1" runat="server" Modal="true" Title="Telerik" Behaviors="Close"
        NavigateUrl="http://www.telerik.com">
    </telerik:RadWindow>

    JavaScript:
    <script type="text/javascript">
        function OnClientTimeSlotClick(sender, args) {
            var wind = $find("<%= RadWindow1.ClientID %>");
            wind.show();
        }
    </script>

    Please have a look into the following demo which illustrate a similar scenario.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pablo
    Pablo avatar
    2 posts
    Member since:
    Nov 2012

    Posted 01 Mar 2013 Link to this post

    Thank you very much Princy your help was very useful for me, but I have one last question
    How could I get the id of the appointment to edit and delete the same way using pop up.

    Thank you very much
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Mar 2013 Link to this post

    Hi,

    You can pass the id as shown below.
    JS:
    function OnClientTimeSlotClick(sender, args) {
          var id = sender.get_appointments().findByID(5).get_id();
          window.radopen("Page.aspx?ID=" + id, null);
      }

    Thanks,
    Princy
  6. Alan
    Alan avatar
    1 posts
    Member since:
    Feb 2012

    Posted 08 Oct 2013 Link to this post

    Hello Princy,

    Your post is really helpful.

    I have the same problem like Pablo but when I test your code and pass the id, it does not work.

    Can you help me with the full code please?

    Thank you.
  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 10 Oct 2013 Link to this post

    Hello Alan,

    I have just answer your ticket but I will also paste my reply here if any one else is looking for the same solution.

    To get the id of the appointment you clicked on you can use the OnClientTimeSlotContextMenu client-side event along with the following function definition:
    function OnClientTimeSlotContextMenu(sender, args) {
                   args.get_appointment().get_id();
                    }


    Regards,
    Kate
    Telerik
    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 the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017