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

Starting schedular in Appointment edit / insert mode

3 Answers 70 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Imran
Top achievements
Rank 1
Imran asked on 30 Sep 2008, 07:02 PM

(I appologize if it is duplicate)

I'm trying to load a schedular in appointment mode, and get the appointment parameters like RecurrenceState and RecurrenceRule to save in my DB. How can I get AppointmentCreatedEventArgs params?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 Oct 2008, 12:20 PM
Hi Imran,

I am not sure what functionality you need to implement, but you can try the following code:

protected void Page_Load(object sender, EventArgs e)  
    {  
        if(!IsPostBack)  
        RadScheduler1.ShowAdvancedInsertForm(DateTime.Now);  
    } 

If that's not what you need, please elaborate on your scenario. Please, be as specific as possible and give some examples to illustrate your point.

Greetings,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Imran
Top achievements
Rank 1
answered on 02 Oct 2008, 01:50 PM
Thanks.

Yes I've got that far. It is showing advanced form onload, and I've hided schedular.

Now to save the appointment, I am not using telerik datasource. We've ORM engine. I want to save Recurrence my way,

So, I did this hackinsh way

private Appointment recurringAppointment = new Appointment("1",
 Convert.ToDateTime("6/1/2007 3:30 PM").ToUniversalTime(),
 Convert.ToDateTime("6/1/2007 4:00 PM").ToUniversalTime(),
 "Sample appointment", "FREQ=HOURLY;COUNT=10;INTERVAL=2");

 private void Page_Load(object sender, EventArgs e)
 {
  RadScheduler1.ShowAdvancedEditForm(recurringAppointment);
 }

 protected void Save()
 {

  recurrencePatternControl.Text = recurringAppointment.RecurrenceRule.ToString();
 }


}

But save doesn't get recurringAppointment Client edited recurrence rule and gave me only the one I initialized.

0
Peter
Telerik team
answered on 03 Oct 2008, 08:33 AM
Hi Imran,

The way you try to implement this scenario is not possible. You need to have the appointment info in your datascource and only after you bind radscheduler you can use the appontment with the ShowAdvancedEditForm method. I suggest you follow the Binding To Generic List example.


Regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Imran
Top achievements
Rank 1
Answers by
Peter
Telerik team
Imran
Top achievements
Rank 1
Share this question
or