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

Custom field for appointment form

13 Answers 198 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
brian
Top achievements
Rank 1
brian asked on 21 Sep 2011, 12:06 AM
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

13 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Sep 2011, 12:50 PM
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
0
brian
Top achievements
Rank 1
answered on 22 Sep 2011, 05:28 PM
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!
0
Peter
Telerik team
answered on 23 Sep 2011, 09:30 AM
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
0
brian
Top achievements
Rank 1
answered on 27 Sep 2011, 12:47 AM
Thanks Peter.
0
brian
Top achievements
Rank 1
answered on 28 Sep 2011, 11:20 PM
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!
0
Peter
Telerik team
answered on 03 Oct 2011, 05:23 PM
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
0
brian
Top achievements
Rank 1
answered on 04 Oct 2011, 09:26 PM
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!
0
Peter
Telerik team
answered on 05 Oct 2011, 03:01 PM
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
0
brian
Top achievements
Rank 1
answered on 06 Oct 2011, 12:57 AM
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!


 
0
Peter
Telerik team
answered on 10 Oct 2011, 02:05 PM
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
0
brian
Top achievements
Rank 1
answered on 12 Oct 2011, 05:08 PM
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.
0
Peter
Telerik team
answered on 17 Oct 2011, 09:10 AM
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
0
brian
Top achievements
Rank 1
answered on 24 Oct 2011, 10:38 PM
Thanks Peter, let me check my code more.
Tags
Scheduler
Asked by
brian
Top achievements
Rank 1
Answers by
Peter
Telerik team
brian
Top achievements
Rank 1
Share this question
or