I’m reevaluating your asp.net suit. First I must say it has improved a lot since last time and you seem to attend to all of my remarks back then.
Right now I’m testing the scheduler. I want to drag and drop from a grid, and open the insert form in the dropped place. Everything seems to work, except for the resources that seem to lose the selected information in the attributes fields.
I’ve being playing around with the demos and currently the code behind looks like this. The form is opened with the right subject and time, but the resources combos index are never selected:
protected void RadGrid1_RowDrop(object sender, GridDragDropEventArgs e)
{
GridDataItem dataItem = e.DraggedItems[0];
Hashtable values = new Hashtable();
dataItem.ExtractValues(values);
Int64 patId = (Int64)dataItem.GetDataKeyValue("ID"); // patient ID from grid
ViewState["PID"] = Convert.ToString(patId);
string fnm = (string)values["fnm"];
string lnm = (string)values["lnm"];
string subject = "New appointment for " + fnm + ' ' + lnm;
string targetSlotIndex = TargetSlotHiddenField.Value;
if (targetSlotIndex != string.Empty)
{
RadScheduler1.Rebind();
ISchedulerTimeSlot slot = RadScheduler1.GetTimeSlotFromIndex(targetSlotIndex);
TimeSpan duration = TimeSpan.FromHours(1);
if (slot.Duration == TimeSpan.FromDays(1))
{
duration = slot.Duration;
}
Appointment app = new Appointment();
app.Start = slot.Start;
app.End = slot.Start.Add(duration);
app.Subject = subject;
app.Attributes["PatientID"] = Convert.ToString(patId);
app.Attributes["PhysicianID"] = "1";
//RadScheduler1.InsertAppointment(app);
TargetSlotHiddenField.Value = string.Empty;
RadScheduler1.Rebind();
RadScheduler1.ShowAdvancedEditForm(app);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadGrid1, RadScheduler1);
}
}