RadScheduler Code Behind

Thread is closed for posting
2 posts, 0 answers
  1. DGraham
    DGraham avatar
    31 posts
    Member since:
    Sep 2008

    Posted 20 Mar 2009 Link to this post

    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
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 23 Mar 2009 Link to this post

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