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

Scheduler / External Edit in RadDock

0 Answers 77 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
shanker bangari
Top achievements
Rank 1
shanker bangari asked on 05 Apr 2010, 01:43 PM
Hi,


this is shanker am doing one project by using telirik controls .In my project am using Scheduler with raddock. it's fine but am face one problem in Scheduler / External Edit in RadDock .my problem is in edit mode am getting problem that is when ever am edit it's show edit values .But am again  edit next one it's shows same values any time am change edit am getting same values. How to solve that please give me any solutions .it's very argent please how to fine that

this is my code 

 public void Getclassrefresh()
        {
            RadScheduler1.DataSource = Calendermanager.sch_view_calendar(Radcomclass.SelectedValue.GetInteger());
            RadScheduler1.DataBind();
        }
        protected void classRefresh_Click(object sender, EventArgs e)
        {
            Getclassrefresh();
          
        }

 protected void RadScheduler1_FormCreating(object sender, SchedulerFormCreatingEventArgs e)
        {
            if (e.Mode == SchedulerFormMode.Insert || e.Mode == SchedulerFormMode.Edit)
            {
                EditedAppointmentID = e.Appointment.ID;
                e.Cancel = true;

                ScriptManager.RegisterStartupScript(Page, GetType(), "formScript", "Sys.Application.add_load(openForm);", true);
                PopulateEditForm(e.Appointment);
            }
            
    }
        protected void PopulateEditForm(Appointment editedAppointment)
        {
            Appointment appointmentToEdit = RadScheduler1.PrepareToEdit(editedAppointment, RadScheduler1.EditingRecurringSeries);
            //DescriptionText.Text = appointmentToEdit.Subject;
            if (appointmentToEdit != null)
            {
                if (appointmentToEdit.ID != null)
                {
                    StartTime.SelectedDate = RadScheduler1.UtcToDisplay(appointmentToEdit.Start);
                    EndTime.SelectedDate = RadScheduler1.UtcToDisplay(appointmentToEdit.End);
                    int s = int.Parse(appointmentToEdit.ID.ToString());
                    var det = Calendermanager.sch_view_calendar_popup(s);
               
                if (det != null)
                {
                    if (det.class1 != null)
                    {
                        formRadclass.SelectedIndex = formRadclass.Items.IndexOf(formRadclass.Items.FindItemByText(det.class1.ToString()));
                    }
                    if (det.subject != null)
                    {
                        RadComboBoxItem item1 = new RadComboBoxItem();
                        item1.Text = det.subject.ToString();
                        item1.Value = det.subject_id.ToString();
                        formRadSubject.Items.Add(item1);
                        
                    }
                    if(det.room!=null)
                    {
                        RadComboBoxItem item1 = new RadComboBoxItem();
                        item1.Text = det.room.ToString();
                        item1.Value = det.room_id.ToString();
                        formRadroom.Items.Add(item1);
                    }
                    if (det.teacher != null)
                    {
                        RadComboBoxItem item1 = new RadComboBoxItem();
                        item1.Text = det.teacher.ToString();
                        item1.Value = det.teacher_person_id.ToString();
                        formRadTeacher.Items.Add(item1);
                    }
                    if (det.session_name != null)
                    {
                        formRadsession.SelectedIndex = formRadclass.Items.IndexOf(formRadsession.Items.FindItemByText(det.session_name.ToString()));
                    }
                 
                }
                }
            }
            Resource user = appointmentToEdit.Resources.GetResourceByType("User");
            if (user != null)
            {
                //UserDropDown.SelectedValue = user.Key.ToString();
            }
        }

please how to solve this problem .

thanks and regrads
shanker.B

No answers yet. Maybe you can help?

Tags
Scheduler
Asked by
shanker bangari
Top achievements
Rank 1
Share this question
or