Custom field for appointment form

14 posts, 0 answers
  1. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 20 Sep 2011 Link to this post

    Hi,

    Seems like Telerik Scheduler is quite good.

    I need extra option though.

    I need to have couple of extra fields available for the form where appointment gets created. Those fields are in different underlying tables so I need the way to have those fields values pushed into those tables. Then I need to have them populated back into edit appointment form.

    I would appreciate if you can get me a snippet.

    Regards, Anvar
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 21 Sep 2011 Link to this post

    Hello Brian,

    Please, review the Advanced Templates demo and let me know if you need further assistance. You can download a stand-alone sample from here.

    Here are some other related resources which you might find helpful.

    http://www.telerik.com/support/kb/aspnet-ajax/scheduler/related-load-on-demand-radcomboboxes-in-the-advanced-form-of-radscheduler.aspx

    http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx


    Greetings, Peter
    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. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 22 Sep 2011 Link to this post

    Thanks Peter, I appreciate it.

    I looked through the options offered by Advanced Templates.

    But our project has very specific requirements so I would like to ask you this: is it possible to invoke a window that is not out of the box by Telerik but my own (so it will have custom design and custom database behind it)?

    I would like to keep all the features offered by Scheduler like drag and drop and underlying calendar itself but I need to have that window of my own.

    Please let me know if it is possible.

    Thanks!
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 23 Sep 2011 Link to this post

    Hello Brian,

    Yes, you can do external edit in RadWindow or RadDock. There is a demo with RadDock and we recommend actually using RadDock, but you can use similar approach with RadWindow as well. Notice how
    FormCreating is handled to get a hold of the appointment and then the event is cancelled to prevent the default edit/insert from from showing:
    protected void RadScheduler1_FormCreating(object sender, SchedulerFormCreatingEventArgs e)
            {
                RadSchedulerRecurrenceEditor1.ResetLayout();
     
                if (e.Mode == SchedulerFormMode.Insert || e.Mode == SchedulerFormMode.Edit)
                {
                    EditedAppointment = e.Appointment;
                    e.Cancel = true;
                }
     
                var appointmentToEdit = RadScheduler1.PrepareToEdit(e.Appointment, RadScheduler1.EditingRecurringSeries);
     
                ScriptManager.RegisterStartupScript(Page, GetType(), "formScript", "Sys.Application.add_load(openForm);", true);
                PopulateEditForm(appointmentToEdit);
            }


    Greetings,
    Peter
    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
  5. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 26 Sep 2011 Link to this post

    Thanks Peter.
  6. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 28 Sep 2011 Link to this post

    Hi Peter,

    I was able to use RadDock for my own custom appointment form.

    You also mentioned that RadWindow for that can be used. Can you get me sample code for RadWindow usage for Scheduler custom appointment form? 

    Also, you mentioned that you would recommend to use RadDock over RadWindow for that particular task. Can you please elaborate on why RadDock is preferable and not RadWindow?

    Thanks!
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Oct 2011 Link to this post

    Hi Brian,

    I am sending you a demo of external edit in RadWindow. I hope you find it helpful.

    Note that we will research if an entirely client-side solution of this is possible and if yes, we will prepare an online demo.

    RadDock's current implementation proved to be simpler and more stable, but using RadWindow is also fine.


    All the best,
    Peter
    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
  8. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 04 Oct 2011 Link to this post

    Hi Peter,

    Thank you the the sample, it does provide me basis for recoding my scheduler with custom Appointment form openable in RadWindow.

    The only thing which is left is how can I distinguish in context of your sample whether or not I edit whole series or just one occurrence of the series? There are two query string parameters passed to my custom RadWindow, "Mode" and "AppointmentID". I may need another one which is indicating if it is whole series or just one occurrence that is being edited.

    There is a form shows up asking you which one would you want to edit and right after you select one of two radio buttons RadWindow shows. There should be a way to capture user's selection of that radio button.

    I would appreciate if you could provide me with snippet.

    Thanks!
  9. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 05 Oct 2011 Link to this post

    Hi Brian,

    You can handle OnClientRecurrenceActionDialogClosed to capture the value the user has chosen:
    var editRecurrenceSeries = false;
          function OnClientRecurrenceActionDialogClosed(sender, args) {
              editRecurrenceSeries = args.get_editSeries();
          }


    Best wishes,
    Peter
    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
  10. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 05 Oct 2011 Link to this post

    Hi Peter,

    Thanks for the snippet, I appreciate it. It was helpful in solving the problem with passing that boolean value as query string.

    I had encountered with weird issue (which I circumvent via custom code and usage of LINQ). I am not sure if it is a bug in Scheduler
    or maybe I am using something not exactly right.

    Basically if I try to update the single appointment out of whole range, I am getting EXDATE value appended improperly in the RecurrenceRule field and that distorts the picture on Scheduler view.

    I use this methods:

      Dim updateApp As Appointment = RadScheduler1.PrepareToEdit(app, MyApp.editRecurrenceSeries)
      RadScheduler1.UpdateAppointment(updateApp)

    app is the appointment which is being picked from the Scheduler to work with. If MyApp.editRecirrenceSeries is false, new row gets inserted into database which is fine. The problem is that Parent row has EXDATE appended with the date of the parent row Start field, not Start field of app row.

    Like I said I did override it with my custom code, but if you could advise something on the matter I would appreciate it.

    Thanks!


     
  11. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 10 Oct 2011 Link to this post

    Hello Brian,

    I will take a note of this scenario and we will research it further. Currently, I cannot verify if this is a bug or not.

    Regards,
    Peter
    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
  12. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 12 Oct 2011 Link to this post

    Thanks Peter.

    If it is in fact a bug, please let me know when it fixed and patch is published so I can incorporate it in my code and remove my circumventing logic.
  13. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 17 Oct 2011 Link to this post

    Hi Brian,

    We don't think there is bug. However, we are not sure what your entire test case is. Can you send us the complete code and how you find the occurrence appointment (by id or via some other means)? It would be best if you can send us a simple working demo via a support ticket.

    Greetings,
    Peter
    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
  14. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 24 Oct 2011 Link to this post

    Thanks Peter, let me check my code more.
Back to Top