I am working on a windows form project and I want to use the AllProperties property from the CalendarInfo.DataBindingsForAppointments class. I have not been able to find a single code example of how this will work using the business classes and not data sets.
My boss has asked me to use business classes and not datasets so I don't have the option to use datasets.
Can someone please post an example or point me in the direction of an example?
Thank you.
Hi, I use the following code to setup my binding:
---------------------------------------------------------------------------------------------------------------------------------------------
ultraCalendarInfo.DataBindingsForAppointments.AllPropertiesMember = "AllProperties";
ultraCalendarInfo.DataBindingsForAppointments.EndDateTimeMember = "EndDateTime";
ultraCalendarInfo.DataBindingsForAppointments.AllDayEventMember = "IsAllDayEvent";
ultraCalendarInfo.DataBindingsForAppointments.SetDataBinding(appointmentBindingSource, string.Empty);
this.ultraCalendarInfo.DataBindingsForAppointments.BindingContextControl = this;
--------------------------------------------------------------------------------------------------------------------------------------------------------------
appointmentList is a BindingList<T> where T is an AppointmentVO.
The AppointmentVO is defined as follows:
public class AppointmentVO
{
/// <summary>
/// Gets or sets the appointment ID.
/// </summary>
/// <value>The appointment ID.</value>
}
/// Gets or sets a value indicating whether this instance is new. The value is false if the VO has been loaded from the DB.
/// <value><c>true</c> if this instance is new; otherwise, <c>false</c>.</value>
/// Gets or sets the owner key.
/// <value>The owner key.</value>
get { return allPropertiesField; }
/// Gets or sets the subject.
/// <value>The subject.</value>
private bool isAllDayEvent;
/// Gets or sets a value indicating whether this instance is an all day event.
/// <value>
/// <c>true</c> if this instance is an all day event; otherwise, <c>false</c>.
/// </value>
private DateTime startDateTimeField = DateTime.MinValue;
/// Gets or sets the start date time.
/// <value>The start date time.</value>
/// Gets or sets the end date time.
/// <value>The end date time.</value>
----------------
hope this helps!