Using your examples I have successfully bound an object to the radGridView, see below
scope.Transaction.Begin()
Dim query As String = "SELECT * FROM AppointmentExtent as Appointment"
currentResult = scope.GetOqlQuery(query).Execute
Me.RadGridView1.DataSource = (currentResult)
scope.Transaction.Commit()
But is it possible to bind an object to a the radScheduler control in the code behind?
Any examples or pointers in the right direction would be greatly appreciated.
----------------------------------------------------------------------------------------------
Solution:
scope.Transaction.Begin()
Dim query As String = "SELECT * FROM AppointmentExtent as Appointment"
currentResult = scope.GetOqlQuery(query).Execute
Dim dataSource As New SchedulerBindingDataSource()
Dim appointmentMappingInfo As New AppointmentMappingInfo()
appointmentMappingInfo.Start =
"Start"
appointmentMappingInfo.[End] =
"End"
appointmentMappingInfo.Summary =
"Subject"
appointmentMappingInfo.Description =
"Description"
appointmentMappingInfo.Location =
"Location"
appointmentMappingInfo.UniqueId =
"Id"
Dim idMapping As SchedulerMapping = appointmentMappingInfo.FindByDataSourceProperty("Id")
idMapping.ConvertToDataSource =
New ConvertCallback(AddressOf Me.ConvertIdToDataSource)
idMapping.ConvertToScheduler =
New ConvertCallback(AddressOf Me.ConvertIdToScheduler)
dataSource.EventProvider.Mapping = appointmentMappingInfo
dataSource.EventProvider.DataSource =
Me.currentResult
Me.RadScheduler1.DataSource = CType(dataSource, SchedulerDataSource)
scope.Transaction.Commit()
Kind regards,
Dave