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

Custom Advanced Edit Form not displaying when launching via ShowAdvancedEditForm?

1 Answer 121 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 14 Jun 2011, 07:31 PM
Hi,

I've got a RadScheduler with a customized Advanced Edit Form in place, and everything works fine when adding/editing appointments via double-clicking. However, I now need to launch the Advanced Form server-side, and I'm unable to do so successfully. I'm using ShowAdvancedEditForm() to launch it, and when tracing through execution I can see that everything in AdvancedForm.ascx is being run as expected, but the Form is never displayed. Instead, the user is returned to the RadScheduler without any visible change.

Any suggestions as to what I might be doing wrong? I've attached the relevant server-side method below, along with my RadScheduler definition from the page itself. I'm guessing it's because I'm not handling the server-side OnFormCreated event, but after looking at the demos and documentation, I'm at a loss at to what I'd have to do in order to handle it.

private bool EditAppointment(string appointmentID)
{
    // Load the existing Appointment
    Guid appointmentGuid = new Guid(appointmentID);
    Appointment editApt = RadScheduler_Main.Appointments.FindByID(appointmentGuid);
    if (editApt == null)
    {
        return false;
    }
    RadScheduler_Main.ShowAdvancedEditForm(editApt);
    return true;
}

<telerik:RadScheduler ID="RadScheduler_Main" runat="server" StartInsertingInAdvancedForm="true" MinutesPerRow="15"
            Height="80%" SelectedView="TimelineView" FirstDayOfWeek="Monday" OnAppointmentInsert="RadScheduler_Main_AppointmentInsert"
            OnClientFormCreated="schedulerFormCreated" GroupingDirection="Vertical" OnClientAppointmentClick="OnClientAppointmentClick"
            OnAppointmentUpdate="RadScheduler_Main_AppointmentUpdated" OverflowBehavior="Scroll" AppointmentContextMenuSettings-EnableDefault="true"
            OnFormCreated="RadScheduler_Main_OnFormCreated">
            <AdvancedForm Modal="true" />
            <Reminders Enabled="false" />
            <TimelineView NumberOfSlots="5" />
              
            <ResourceStyles>
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryOrange" Text="ELN" />
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryGreen" Text="Reporting" />
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryYellow" Text="Stability" />
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryBlue" Text="Sample Tracker" />
            </ResourceStyles>
            <AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
                    Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>'
                    End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                    ApplicationID = '<%# Bind("Applicationid") %>'
                    Task='<%# Bind("Taskid") %>' />
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Insert"
                    Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>'
                    End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' 
                    ApplicationID = '<%# Bind("Applicationid") %>'/>
            </AdvancedInsertTemplate>
        </telerik:RadScheduler>

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 15 Jun 2011, 03:17 PM
Hi Adam,

I am sending you a simple demo showing how you can show the Advanced Form of appointment with a button-click:
void Button1_Click(object sender, EventArgs e)
   {
       Appointment a = RadScheduler1.Appointments.FindByID(13);
       RadScheduler1.ShowAdvancedEditForm(a, RadScheduler1.EditingRecurringSeries);
   }

Best wishes,
Plamen Zdravkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Scheduler
Asked by
Adam
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or