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. Image for the cookie policy date

no SimpleScheduleItemList() ERROR CS0246

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?


4 Replies

JP Jagadeesan Pichaimuthu Syncfusion Team 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


AR Arthur May 6, 2019 01:54 PM UTC

 It solved the problem, Thanks!


AR Arthur 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?


JP Jagadeesan Pichaimuthu Syncfusion Team 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 
  
  
  
  
  
  


Loader.
Up arrow icon