Hi,
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()
appointmentsAdapter.Fill(Me.SchedulerDataDataSet1.Appointments)
Dim resourcesAdapter As New ResourcesTableAdapter()
resourcesAdapter.Fill(Me.SchedulerDataDataSet1.Resources)
Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Fill(Me.SchedulerDataDataSet1.AppointmentsResources)
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()
appointmentsAdapter.Update(Me.SchedulerDataDataSet1.Appointments)
Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Update(Me.SchedulerDataDataSet1.AppointmentsResources)