DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

7 posts, 1 answers
  1. Vinix
    Vinix avatar
    32 posts
    Member since:
    Jan 2008

    Posted 01 Mar 2008 Link to this post

    I drag a RadScheduler to my webform, and start debug, then I get an error message as following. Please tell me how to solve the problem. Thank you very much for your helping.

    DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding]
    Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.EnsureDataFieldsAreSet() +205
    Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.GetAppointments(RadScheduler owner) +130
    Telerik.Web.UI.RadScheduler.PerformSelect() +240
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
    Telerik.Web.UI.RadScheduler.EnsureDataBound() +116
    Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +144
    Telerik.Web.UI.RadScheduler.CreateChildControls() +47
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +41
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
  2. Answer
    Piyush
    Piyush avatar
    164 posts
    Member since:
    Nov 2007

    Posted 02 Mar 2008 Link to this post


    Error says it all. These fields need values to be able to display the Scheduler. Have you assigned any values for them?
  3. Vinix
    Vinix avatar
    32 posts
    Member since:
    Jan 2008

    Posted 02 Mar 2008 Link to this post

    I already solve the problem.
    Thank you very much.
  4. AgJeff
    AgJeff avatar
    9 posts
    Member since:
    Jul 2008

    Posted 25 Jan Link to this post

    is there a way to turn off databinding and just fill appointments manually? or do i have to implement custom dataprovider. The exchangeprovider in the sdk doesn't work or i'd use that
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1313 posts

    Posted 28 Jan Link to this post

    Hello,

    The RadScheduler object provide an InsertAppointment method that expects an appointment object. This way you can manually add an appointment instead of setting data source.

    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. AgJeff
    AgJeff avatar
    9 posts
    Member since:
    Jul 2008

    Posted 28 Jan Link to this post

    yes I got that thanks - there's no problem inserting appointments however even if you're not using databinding you apparently have to fill out values for DataKeyField etc - this is either a bug or very irritating 'feature'
  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1313 posts

    Posted 02 Feb Link to this post

    Hello,

    Indeed you have to set the required fields such as DataKeyField , DataSubject and etc in order to run the RadScheduler control, unless you use a custom provider.


    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top