This is a migrated thread and some comments may be shown as answers.

RadScheduler Resource Binding

3 Answers 204 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 1
Joseph asked on 25 Jan 2011, 06:55 AM
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

3 Answers, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 27 Jan 2011, 02:47 PM
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.
0
Joseph
Top achievements
Rank 1
answered on 27 Jan 2011, 10:54 PM
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!
0
Joseph
Top achievements
Rank 1
answered on 01 Feb 2011, 09:02 AM
Thank you for your help
Tags
Scheduler and Reminder
Asked by
Joseph
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Joseph
Top achievements
Rank 1
Share this question
or