Hi,
I'm trying to bind the data in my RadScheduler using the Data Source Property. I'm following the instructions in the Help file and have hit a stone wall. According to the help file, this way of binding allows you to "bind the scheduler directly to a DataTable or DataView (IListSource), or to various List objects (IEnumerable)". In the demo it states "RadScheduler can also be bound to both generic and non-generic collections. This allows you to directly use your business objects as a data source."
Here is my problem, the properties of my business objects reflect the fields of the records in the database. The properties in the Help file do not reflect the fields of the records in the database. In the AppointmentInfo Class of the example, there is the following property:
This is not a field in the example Database structure.
I cannot add fields to my business objects because they are derived directly from the database and are integrated into a framework (Mere Mortals.NET) managing many aspects of the data-to-database functions. Therefore, I cannot create a generic collection of type <MyBusinessObject> and bind the scheduler to it.
Also, I do not understand how you would use the Data Property to bind the RadScheduler to a DataTable or DataSet. Wouldn't you run into the same problem with the RecurrenceState property shown above?
At the moment, I have the RadScheduler bound to the Generic List and it is returning the appointments, however, I am trying to emulate the following code using my business objects and have no way of reconciling the RecurrenceState property passed in via the Appointment object (source) and my business object:
Any elucidation would be great.
Thanks for all your help,
Don
I'm trying to bind the data in my RadScheduler using the Data Source Property. I'm following the instructions in the Help file and have hit a stone wall. According to the help file, this way of binding allows you to "bind the scheduler directly to a DataTable or DataView (IListSource), or to various List objects (IEnumerable)". In the demo it states "RadScheduler can also be bound to both generic and non-generic collections. This allows you to directly use your business objects as a data source."
Here is my problem, the properties of my business objects reflect the fields of the records in the database. The properties in the Help file do not reflect the fields of the records in the database. In the AppointmentInfo Class of the example, there is the following property:
public
RecurrenceState RecurrenceState
{
get
{
return
recurState; }
set
{ recurState = value; }
This is not a field in the example Database structure.
I cannot add fields to my business objects because they are derived directly from the database and are integrated into a framework (Mere Mortals.NET) managing many aspects of the data-to-database functions. Therefore, I cannot create a generic collection of type <MyBusinessObject> and bind the scheduler to it.
Also, I do not understand how you would use the Data Property to bind the RadScheduler to a DataTable or DataSet. Wouldn't you run into the same problem with the RecurrenceState property shown above?
At the moment, I have the RadScheduler bound to the Generic List and it is returning the appointments, however, I am trying to emulate the following code using my business objects and have no way of reconciling the RecurrenceState property passed in via the Appointment object (source) and my business object:
public
void
CopyInfo(Appointment source)
{
subject = source.Subject;
start = source.Start;
end = source.End;
------>
recurState = source.RecurrenceState; <------------Here
recurData = source.RecurrenceRule;
if
(source.RecurrenceParentID !=
null
)
recurParentID = source.RecurrenceParentID.ToString();
Resource r = source.Resources.GetResourceByType(
"Room"
);
if
(r !=
null
)
room = (
int
) r.Key;
Any elucidation would be great.
Thanks for all your help,
Don