This question is locked. New answers and comments are not allowed.
Hi telerik,
I had a custom appointment inherits from IAppointment as shown in your document,
but save button is disabled when appointment is newly created or edited after that.
However it is enabled when editing originally saved appointment which is loaded on scheduleview open.
I've read related thread and used CommandMnager.InvalidatexxxRequery on OnPropertyChanged
of custom appointment class,but same result.
I'm not using IDataErrornfo and any validation on edit widnow . What am I missing ?
I attached my custom class and imge.
public class OrderAppointEntity : Appointment,IOrderAppointmentEntity
{
private string _partNo = string.Empty;
public string PartNo
{
get { return this.Storage<
OrderAppointEntity
>()._partNo; }
set
{
var storage = this.Storage<
OrderAppointEntity
>();
if (storage._partNo != value)
{
storage._partNo = value;
this.OnPropertyChanged(() => this.PartNo);
}
}
}
.....
public override IAppointment Copy()
{
var newAppointment = new OrderAppointEntity();
newAppointment.CopyFrom(this);
return newAppointment;
}
public override void CopyFrom(IAppointment other)
{
var order = other as OrderAppointEntity;
if (order != null)
FetchInfo(order.Id, order.Qty, order.PartNo, order.OrderType, order.Start, order.Unit);
base.CopyFrom(other);
}
public void FetchInfo(int id, decimal qty, string partNo, OrderTypeEnums ordrType, DateTime start, string unit)
{
this.Id = id;
this.Qty = qty;
this.PartNo = partNo;
this.OrderType = ordrType;
this.Start = start;
this.DateString = start.ToString("d");
this.DelTime = start - start.Date;
// always set 2 hrs
this.End = start.AddHours(2);
this.Unit = unit;
SetSubject();
}
I only use Start/Subject/End property among original ones.
My version is 2012.02.
Thank you in advance.
Kang