RadScheduler Resource Binding

4 posts, 0 answers
  1. Joseph
    Joseph avatar
    9 posts
    Member since:
    Oct 2010

    Posted 25 Jan 2011 Link to this post

    Hello,
    I am trying to follow along with webinars to learn the RadScheduler.  I successfully was able to create an application that had no resources, create schedules etc...I can save appointments and the Appointments table in the Telerik provided example database populates fine and all..when I have one resource only.

    The problem comes when I try to save to a RadScheduler with more than 1 resource.
    AppointmentsResources table in database does not seem to populate.  Also, newly created schedule item you just tried to save disappears.  No appointments load up on initial load either.
    I tried to emulate it working by creating a manual entry in AppointmentsResources table, to no avail, so I deleted entry.
    However, Appointments table still populates correctly.

    Code is simple
    Using Telerik provided database. Thank you very much!
    Imports Telerik.WinControls.UI
      
    Public Class Form1
      
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'SchedulerDataDataSet.Resources' table. You can move, or remove it, as needed.
            Me.ResourcesTableAdapter.Fill(Me.SchedulerDataDataSet.Resources)
            'TODO: This line of code loads data into the 'SchedulerDataDataSet.Appointments' table. You can move, or remove it, as needed.
            Me.AppointmentsTableAdapter.Fill(Me.SchedulerDataDataSet.Appointments)
      
      
      
            RadScheduler1.ActiveView.ResourcesPerView = 5
            RadScheduler1.GroupType = GroupType.Resource
      
      
      
      
        End Sub
      
        Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
      
            Dim appointmenttableadapter As New SchedulerDataDataSetTableAdapters.AppointmentsTableAdapter()
            Dim resourcetableadapter As New SchedulerDataDataSetTableAdapters.AppointmentsResourcesTableAdapter()
      
      
            Try
      
                appointmenttableadapter.Update(SchedulerDataDataSet.Appointments)
                resourcetableadapter.Update(SchedulerDataDataSet.AppointmentsResources)
      
                SchedulerDataDataSet.AcceptChanges()
      
      
            Catch ex As Exception
                Throw ex
            Finally
      
            End Try
      
      
        End Sub
    End Class
  2. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 27 Jan 2011 Link to this post

    Hi Joseph,

    Thank you for writing.

    First, I noticed that you do not load the AppointmentsResouces data table. This means that you will not load the resources related to the appointment. I am attaching a sample project that implements what you should to do when you load and store the changes in the database. The sequence of loading of the resources is important, because appointments and resources are related to the AppointmentsResources data table.
     
    I hope that this will help you. In case that you have other related questions, feel free to write back.

    Greetings,
    Dobry Zranchev
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Joseph
    Joseph avatar
    9 posts
    Member since:
    Oct 2010

    Posted 27 Jan 2011 Link to this post

    Hi Dobry,
    Thanks for writing!  I will take a look at what you have sent when I get home, and let you know how I make out.
    Thanks again for your assistance!
  5. Joseph
    Joseph avatar
    9 posts
    Member since:
    Oct 2010

    Posted 01 Feb 2011 Link to this post

    Thank you for your help
Back to Top