Data Source Property Help File Not Matching Real World Practices?

3 posts, 0 answers
  1. Don
    Don avatar
    17 posts
    Member since:
    Aug 2010

    Posted 10 Sep 2010 Link to this post

    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:

    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

  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 15 Sep 2010 Link to this post

    Hi Don,

    Actually you don't need the RecurrenceState property as the other two: RecurrenceRule and RecurrenceParentID are enough. We'll fix the help article and remove the outdated RecurrenceState.

    I realize the confusement caused by the mismatching help articles. Please accept my apologies for the caused inconvenience.

    Best Regards,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Don
    Don avatar
    17 posts
    Member since:
    Aug 2010

    Posted 15 Sep 2010 Link to this post

    No apologies necessary.  Thank you very much for clearing that up for me.

    Don
Back to Top