This is a migrated thread and some comments may be shown as answers.
RadScheduler Code Behind
1 Answer 54 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
DGraham
Top achievements
Rank 1
DGraham asked on 20 Mar 2009, 02:45 PM
Hi,

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

1 Answer, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 23 Mar 2009, 03:05 PM
Hello Dave Palmer,
There is a RadScheduler example here:
http://www.telerik.com/community/code-library/orm/general/openaccess-dataprovider-for-radscheduler.aspx

It might answer your questions.

All the best,
Jan Blessenohl
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
DGraham
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Share this question
or