This is a migrated thread and some comments may be shown as answers.

DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

6 Answers 621 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Vinix
Top achievements
Rank 1
Vinix asked on 01 Mar 2008, 06:25 PM

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

6 Answers, 1 is accepted

Sort by
0
Accepted
Piyush Bhatt
Top achievements
Rank 2
answered on 02 Mar 2008, 09:24 PM

Error says it all. These fields need values to be able to display the Scheduler. Have you assigned any values for them?
0
Vinix
Top achievements
Rank 1
answered on 03 Mar 2008, 03:10 AM
I already solve the problem.
Thank you very much.
0
AgJeff
Top achievements
Rank 1
answered on 25 Jan 2015, 11:35 PM
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
0
Boyan Dimitrov
Telerik team
answered on 28 Jan 2015, 03:42 PM
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.

 
0
AgJeff
Top achievements
Rank 1
answered on 28 Jan 2015, 03:54 PM
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'
0
Boyan Dimitrov
Telerik team
answered on 02 Feb 2015, 11:14 AM
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.

 
Tags
Scheduler
Asked by
Vinix
Top achievements
Rank 1
Answers by
Piyush Bhatt
Top achievements
Rank 2
Vinix
Top achievements
Rank 1
AgJeff
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or