Resource information did not save

2 posts, 0 answers
  1. Dave Mortgatta
    Dave Mortgatta avatar
    16 posts
    Member since:
    Aug 2009

    Posted 17 Apr 2012 Link to this post

    I am having an issue to save data to database.

    I used code below to bind data from database and save information into database as needed.

    but Resource field, it did not save the information at all. for example, user books new appointment and choose resource: Laptop and clicks save, but when user come back, resouce field went to None.

    Please help and kindly regard.

    'load event...
    Me.SchedulerDataDataSet1 = New SchedulerDataDataSet()
    Dim appointmentsAdapter As New AppointmentsTableAdapter()
    Dim resourcesAdapter As New ResourcesTableAdapter()
    Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
    Dim dataSource As New SchedulerBindingDataSource()
    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.Resources = "Appointments_AppointmentsResources"
    appointmentMappingInfo.ResourceId = "ResourceID"
    appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"

    dataSource.EventProvider.Mapping = appointmentMappingInfo
    dataSource.EventProvider.DataSource = Me.SchedulerDataDataSet1.Appointments

    Dim resourceMappingInfo As New ResourceMappingInfo()
    resourceMappingInfo.Id = "ID"
    resourceMappingInfo.Name = "Name"

    dataSource.ResourceProvider.Mapping = resourceMappingInfo
    dataSource.ResourceProvider.DataSource = Me.SchedulerDataDataSet1.Resources

    Me.RadScheduler1.DataSource = dataSource

    'Save data...
    Dim appointmentsAdapter As New AppointmentsTableAdapter()

    Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 20 Apr 2012 Link to this post

    Hi Dave,

    Thank you for contacting us.

    At the bottom of this help article there is a section that demonstrates how to save appointments. Please try saving the appointments as described there. If this does not help, please open a new support ticket and send us a sample project and a database script so I can reproduce the scenario locally. This will allow me to investigate your code and isolate the reason for this behavior.

    Please let me know if you need further help.

    All the best,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. DevCraft R3 2016 release webinar banner
Back to Top