Hi,
I am trying to stop the scheduler from showing the in-edit appointment option.
To explain, I have created ASP code in the .cs file which, when the user double clicks on the date (in the scheduler) it automatically logs the appointment based on a category of "morning" "afternoon" "all day".
All of this code works fine, my problem is after you have double clicked on the scheduler it populates the appointment but waits for the user to click the "tick" to commit the changes.
Can the commit be done within the ASP code at all? I notice that the rad window example will do this, but in that example the clientside code (javascript) opens the rad window then cancels the appointment, then the radwindow reinserts the appointment.
In my case all my code is via ASP meaning the RadWindow example will not work for me as the clientside script will always fire before the server side.
Below is a snippet of my code, Can anyone help?
I am trying to stop the scheduler from showing the in-edit appointment option.
To explain, I have created ASP code in the .cs file which, when the user double clicks on the date (in the scheduler) it automatically logs the appointment based on a category of "morning" "afternoon" "all day".
All of this code works fine, my problem is after you have double clicked on the scheduler it populates the appointment but waits for the user to click the "tick" to commit the changes.
Can the commit be done within the ASP code at all? I notice that the rad window example will do this, but in that example the clientside code (javascript) opens the rad window then cancels the appointment, then the radwindow reinserts the appointment.
In my case all my code is via ASP meaning the RadWindow example will not work for me as the clientside script will always fire before the server side.
Below is a snippet of my code, Can anyone help?
| protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e) |
| { |
| DropDownList jobtype = (DropDownList)fvNewService2.FindControl("ddlJobType"); |
| DropDownList employee = (DropDownList)fvNewService2.FindControl("ddlEmployee"); |
| DropDownList jobstatus = (DropDownList)fvNewService2.FindControl("ddlJobStatus"); |
| DropDownList time = (DropDownList)fvNewService2.FindControl("ddlTime"); |
| TextBox mileage = (TextBox)fvNewService2.FindControl("ServiceHistoryMilageTextBox"); |
| TextBox hoursworked = (TextBox)fvNewService2.FindControl("txHoursWorked"); |
| DropDownList paymenttype = (DropDownList)fvNewService2.FindControl("ddlPaymentType"); |
| DropDownList paymentstatus = (DropDownList)fvNewService2.FindControl("ddlPaymentStatus"); |
| string starttime; |
| string endtime; |
| string thedate; |
| thedate = e.Appointment.Start.ToShortDateString(); |
| //create code for noew line |
| char chrCR = (char)13; |
| string strCR = chrCR.ToString(); |
| char chrLF = (char)10; |
| string strLF = chrLF.ToString(); |
| string strCRstrCRLF = strCR + strLF; |
| //obtain hours based on the form value of time |
| switch (time.SelectedValue) |
| { |
| default: |
| starttime = thedate.ToString() + " 09:00:00"; |
| endtime = thedate.ToString() + "17:00:00"; |
| break; |
| //Morning |
| case "1": |
| starttime = thedate.ToString() + " 09:00:00"; |
| endtime = thedate.ToString() + " 12:00:00"; |
| break; |
| //Afternoon |
| case "2": |
| starttime = thedate.ToString() + " 12:00:00"; |
| endtime = thedate.ToString() + " 17:00:00"; |
| break; |
| //All Day |
| case "3": |
| starttime = thedate.ToString() + " 09:00:00"; |
| endtime = thedate.ToString() + " 17:00:00"; |
| break; |
| } |
| e.Appointment.Start = DateTime.Parse(starttime.ToString()); |
| e.Appointment.End = DateTime.Parse(endtime.ToString()); |
| e.Appointment.Subject = "Job Type: " + jobtype.SelectedItem.ToString() + strCRLF.ToString() |
| + "Employee:" + employee.SelectedItem.ToString(); |
| // how do I commit the appointment from here???????????? |
| } |