We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

no SimpleScheduleItemList() ERROR CS0246

Thread ID:

Created:

Updated:

Platform:

Replies:

144385 May 3,2019 01:28 PM UTC May 7,2019 09:40 AM UTC WinForms 4
loading
Tags: ScheduleControl
Arthur
Asked On May 3, 2019 01:28 PM UTC

Hello, i'm trying to create a new schedule control following the quick start guide https://help.syncfusion.com/windowsforms/schedule/getting-started
I've copied the code to the form1.cs  After adding the SimpleScheduleDataProvider.cs  
But looks like theres no SimpleScheduleItemList()  as it gives me the ERROR CS0246, what do I do?


Jagadeesan Pichaimuthu [Syncfusion]
Replied On May 6, 2019 07:13 AM UTC

Hi Arthur, 
  
Sorry for the inconvenience caused. 
  
In SimpleSheduleDataProvider, we have defined the SchedulAppointmentList as SimpleScheduleAppointmentList. So, please use SimpleScheduleAppointmentList instead of SimpleScheduleItemList to resolve your reported issue. Please refer the following code example and sample. 
  
C# 
private void Form1_Load(object sender, EventArgs e) 
{ 
    SimpleScheduleDataProvider data = new SimpleScheduleDataProvider(); 
    data.MasterList = new SimpleScheduleAppointmentList(); 
    //TO populate the data for master list. 
    data.MasterList = SimpleScheduleDataProvider.InitializeRandomData(); 
    data.FileName = "default.schedule"; 
    this.scheduleControl1.ScheduleType = ScheduleViewType.Month; 
    this.scheduleControl1.DataSource = data; 
} 
  
  
Also, we have logged the documentation report to change the code part in our UG location which will be available on 10th May 2019. 
  
Please get back to us if you need any further assistance on this. 
  
Regards, 
Jagadeesan

Arthur
Replied On May 6, 2019 01:54 PM UTC

 It solved the problem, Thanks!

Arthur
Replied On May 6, 2019 04:25 PM UTC

let me ask one more thing, where do I apply the Metro Theme for the ScheduleControl? 

this.scheduleControl1.GetScheduleHost().Schedule.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro;

is it on form_load?

Jagadeesan Pichaimuthu [Syncfusion]
Replied On May 7, 2019 09:40 AM UTC

Hi Arthur, 
  
Thanks for your update. 
  
We are glad to know that the reported problem has been resolved at your end. And you can able to set the metro or other theme to schedule control either while form loading or dynamically (with button click operation). Please refer the below code snippet and sample for your reference. 
  
private void Form1_Load(object sender, EventArgs e) 
{ 
    SimpleScheduleDataProvider data = new SimpleScheduleDataProvider(); 
    data.MasterList = new SimpleScheduleAppointmentList(); 
    //TO populate the data for master list. 
    data.MasterList = SimpleScheduleDataProvider.InitializeRandomData(); 
    data.FileName = "default.schedule"; 
    this.scheduleControl1.ScheduleType = ScheduleViewType.Month; 
    this.scheduleControl1.DataSource = data; 
 
    this.scheduleControl1.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro; 
 
    // And also you can able to set theme using below code 
    //this.scheduleControl1.GetScheduleHost().Schedule.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro; 
} 
private void button1_Click(object sender, EventArgs e) 
{ 
    this.scheduleControl1.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro; 
} 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
Please refer the below sample for your reference, 
  
  
  
  
  
 
Let us know whether this helps also if you need any further assistance on this. 
 
Regards, 
Jagadeesan 
  
  
  
  
  
  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon