Resources not binding

3 posts, 1 answers
  1. JJ
    JJ avatar
    9 posts
    Member since:
    Mar 2010

    Posted 31 Mar 2010 Link to this post

    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. Frans van Ek
    Frans van Ek avatar
    2 posts
    Member since:
    Mar 2010

    Posted 02 Apr 2010 Link to this post

    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
  3. Answer
    Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    353 posts

    Posted 02 Apr 2010 Link to this post

    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.
Back to Top