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

Resources not binding

2 Answers 101 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 31 Mar 2010, 06:38 PM

I am going through the testing and tyring out how to program the RAD Scheduler. I have created the SchedulerData database in MSSQL Server and then added 2 resources in the Resource table. After running the program, I did not see the data in the Resource List Box.

 

Following code is typed under the Load Event.

 


' create and assign appointment mapping


        Dim appointmentMappingInfo As New AppointmentMappingInfo()  
        appointmentMappingInfo.Start = "Start" 
        appointmentMappingInfo.[End] = "End" 
        appointmentMappingInfo.Summary = "Summary" 
        appointmentMappingInfo.Description = "Description" 
        appointmentMappingInfo.Location = "Location" 
        appointmentMappingInfo.BackgroundId = "BackgroundID" 
        appointmentMappingInfo.StatusId = "StatusID" 
        appointmentMappingInfo.RecurrenceRule = "RecurrenceRule" 
        appointmentMappingInfo.Resources = "FK_AppointmentsResources_Appointments" 
        appointmentMappingInfo.ResourceId = "ResourceID" 
        SchedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo  
        SchedulerBindingDataSource1.EventProvider.DataSource = SQLSchedulerDataDataSet.Appointments 
' create and assign resource mapping
 
        Dim resourceMappingInfo As New ResourceMappingInfo()  
        resourceMappingInfo.Id = "ID" 
        resourceMappingInfo.Name = "ResourceName" 
        SchedulerBindingDataSource1.ResourceProvider.Mapping = resourceMappingInfo  
        SchedulerBindingDataSource1.ResourceProvider.DataSource = SQLSchedulerDataDataSet.Resources 

' create and assign appointment mapping


        Dim appointmentMappingInfo As New AppointmentMappingInfo()  
        appointmentMappingInfo.Start = "Start" 
        appointmentMappingInfo.[End] = "End" 
        appointmentMappingInfo.Summary = "Summary" 
        appointmentMappingInfo.Description = "Description" 
        appointmentMappingInfo.Location = "Location" 
        appointmentMappingInfo.BackgroundId = "BackgroundID" 
        appointmentMappingInfo.StatusId = "StatusID" 
        appointmentMappingInfo.RecurrenceRule = "RecurrenceRule" 
        appointmentMappingInfo.Resources = "FK_AppointmentsResources_Appointments" 
        appointmentMappingInfo.ResourceId = "ResourceID" 
        SchedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo  
        SchedulerBindingDataSource1.EventProvider.DataSource = SQLSchedulerDataDataSet.Appointments 

 

In the appointment table I have the following fields
ID
Summary
Start
[End]
RecurrenceRule
MasterEventId
Location
Description
BackgroundId

and in the resource table I have the following fields
ID
Name
Image



Thanks for your help.

 

 

2 Answers, 1 is accepted

Sort by
0
Frans van Ek
Top achievements
Rank 1
answered on 02 Apr 2010, 02:27 PM
I've got the same issue, exept my resources are bound. Only the appointment does not link the correct resource but the list of resources is filled.

I'm wondering in you're code why there is no reference to a resource in the appointment table. You're mapping the resource bwith the column resourceId but that one doesn't exists in you' re table.

the reason why the list is not showing is the your mapping the name to ResourceName but your table containts a column NAME

resourceMappingInfo.Name = "ResourceName"  

Should be

resourceMappingInfo.Name = "Name"  

Hopes it helps. Will you let me know if the relealtion between appointment and resource is working with you?

Kind regards,

Frans
0
Accepted
Dobry Zranchev
Telerik team
answered on 02 Apr 2010, 03:21 PM
Hello JJ,

Thank you for the question.

You should change only the following code:
 
resourceMappingInfo.Name = "ResourceName"
 
with
 
resourceMappingInfo.Name = "Name"
 
because the name in the database is "Name" not "ResourceName".

If you have additional questions feel free to ask.

Greetings,
Dobry Zranchev
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.
Tags
Scheduler and Reminder
Asked by
JJ
Top achievements
Rank 1
Answers by
Frans van Ek
Top achievements
Rank 1
Dobry Zranchev
Telerik team
Share this question
or