OK, I seem to have made a bit more progress in understanding the problem (the code is still busted). My problem appears to be (I think) related to my implementation of the SaveCallbackCommand.AssignControllerValues() implementation. If I use my controller/container/callbackcommand code with the unaltered AppointmentForm control and I use the base.AssignControllerValues() implementation, everything works fine.
If I use my override code for the AssignControllerValues() it fails as before (even with the AppointmentForm control implementation). This would suggest I think that I am not finalizing some sort of state as part of this operation. My code is as follows:
protected override void AssignControllerValues() {
ASPxTextBox tbSubject = (ASPxTextBox)FindControlByID("tbSubject");
ASPxDateEdit edtStartDate = (ASPxDateEdit)FindControlByID("edtStartDate");
ASPxDateEdit edtEndDate = (ASPxDateEdit)FindControlByID("edtEndDate");
ASPxComboBox cbResource = (ASPxComboBox)FindControlByID("edtResource");
Controller.Subject = tbSubject.Text;
Controller.ResourceId = cbResource.SelectedItem.Value;
Controller.Start = edtStartDate.Date;
Controller.End = edtEndDate.Date;
// base.AssignControllerValues();
}
Please note that I cannot use the base.AssignControllerValues() in my own code as I have removed some of the fields from my version of the ApppointmentForm and it will end up throwing an exception.
Thanks,
Adrian.