CSLA & DevExpress XtraScheduler

CSLA & DevExpress XtraScheduler

Old forum URL: forums.lhotka.net/forums/t/6900.aspx


RedShiftZ posted on Tuesday, May 05, 2009

I have read that some of the members of this board use CSLA & DevExpress successfully together. Would any of you mind helping me figure out a problem I am having with this? Would any of you mind posting sample source to make this work?

For instance, one problem I am having...
I have successfully created a AppointmentList object (BusinessListBase) and Appointment object (BusinessBase).
I can load the appointments into the scheduler fine via the    
public static AppointmentList GetAppointmentList(){ return DataPortal.Fetch<AppointmentList>(); }

However when I try to use the UI to add an appointment it is trying to call the constructor of Appointment. I cannot find where to override this.

Thank you for your time,

Jeff Young

DocJames replied on Wednesday, May 06, 2009


I don't know if it's the same with XtraScheduler, but to get XtraGrid working I need to make the BusinessBase (the child object) contructor Public instead of Private.

Jimmy

Marjon1 replied on Wednesday, May 06, 2009

The other option is to override AddNewCore() on your AppointmentList, that can then call your factory method to create a new object and add it to the list, without the need for a public constructor.

Can't remember if this worked for the scheduler when we designed this, but it works with the XtraGrids and I'm sure I would have remember if it was too different.

RedShiftZ replied on Thursday, May 07, 2009

Marjon:
The other option is to override AddNewCore() on your AppointmentList, that can then call your factory method to create a new object and add it to the list, without the need for a public constructor.

Can't remember if this worked for the scheduler when we designed this, but it works with the XtraGrids and I'm sure I would have remember if it was too different.

AddNewCore() Did the trick. Thank you.

Copyright (c) Marimer LLC