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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Working eample of the Schedule Control

Thread ID:

Created:

Updated:

Platform:

Replies:

127923 Dec 8,2016 06:37 PM UTC Mar 19,2018 09:57 AM UTC WinForms 8
loading
Tags: ScheduleControl
Sarosh Wadia
Asked On December 8, 2016 06:37 PM UTC

Hi!

Planning to use the Schedule Control + Calendar control in an MVC 5 app along with EF and MSSQL, do you have any working examples of this?

Thanks

Karthigeyan Krishnamurthi [Syncfusion]
Replied On December 9, 2016 11:30 AM UTC

   
Thank you for contacting Syncfusion support.   
   
We have prepared a sample for your requirement “Schedule with Calendar (Date picker) control in Entity Framework” which can be download from the below location.   
   
In the above sample, both Schedule and Calendar (Date picker) control will be rendered in the same page. When a date is selected in Calendar (Date picker) control, Scheduler view will be refreshed with the selected date. Kindly refer the below code example used in a sample and please visit the below links to know more about the data binding.   
 
<Code> 
function onSelected(args) { // this function will be called when the date is selected in the month calendar 
        $("#Schedule1").ejSchedule({ currentDate: new Date(args.value) }); // here we are rendering the Scheduler with the selected date 
    } 
</Code> 

Note: By default, Calendar (Date picker) control is used with in the Schedule control, which will be displayed, while clicking the top left navigation area as shown in the below image.   
 
 

Regards, 
Karthigeyan 


Sarosh Wadia
Replied On December 16, 2016 03:21 PM UTC

Hi!

I would like to do the same with the Schedule control in a Winform app as well with multiple Resources is that possible?

I was going through the documentation but could not see how I could add multi (group) resources in the header of the scheduler in Winforms also databinding is not straight forward.

1] Winform App with Scheduler
2] Winform App with Scheduler and SQL databinding
3] Winform App with Scheduler and multiple Resources (grouping)

Any example will be really appreciated.

Thanks

Mohanraj Gunasekaran [Syncfusion]
Replied On December 19, 2016 12:35 PM UTC

Hi Sarosh, 

Thanks for using Syncfusion products. 

1] Winform App with Scheduler 
We have already provided the dashboard sample in following location for schedule control. 
<Installed_location>/Syncfusion/EssentialStudio/<build_version>/Samples/windows/Schedule/Schedule.Windows/Samples/Scheduler Demo/cs 


2] Winform App with Scheduler and SQL databinding 
We have created a sample for adding the SQL data into the Schedule control as per your requirement. In this sample we have populated the ScheduleControl with the sql database. Please refer to the following sample,    
 
Sample Link: ScheduleControl  
 
Note:  
To work with the SQL data at your client machine, please modify the connection string by creating a data base using the SQL Express and add the table “ScheduleData” like the attached local db file.   

3] Winform App with Scheduler and multiple Resources (grouping) 
Currently we do not have the support for this feature so we have logged the feature report to add the multi resources on the header. So it will be available on any of our upcoming release. 


Regards, 
Mohanraj G. 


John Alfred C. Dafielmoto
Replied On March 6, 2018 09:45 PM UTC

hi, do we have a link to download the sample c# windows for this scheduler because I did not include from installation for sample files, hardisk almost full ^_^


Sarosh Wadia
Replied On March 6, 2018 09:46 PM UTC

Hi!

I'm not sure what you mean?

Thanks

Arulpriya Ramalingam [Syncfusion]
Replied On March 7, 2018 09:31 AM UTC

Hi John,  
  
Thanks for the update.  
  
Usually, we don’t provide the demo samples through online since, the samples are available in Syncfusion build installed location [<Installed_location>/Syncfusion/EssentialStudio/<build_version>/Samples] while installing the Syncfusion Essential Studio setup file. So, please make use of the below sample link,  
  
Sample link: Scheduler  
  
Please let us know, if you have any other queries.   
  
Regards,  
Arulpriya  


Keith C
Replied On March 18, 2018 04:26 PM UTC

Can the example provided be updated to reflect saving appointment additions and modifications back to the database please? I was able to get the sample #2 working to pull from SQL but it does not save, though it prompts to do such.

I am evaluating product and cannot find sample to illustrate this. Ideally would like to completely eliminate the need for the text file. Thanks.




Arulpriya Ramalingam [Syncfusion]
Replied On March 19, 2018 09:57 AM UTC

Hi Keith,   
   
Thanks for the update.   
   
By default, the ScheduleControl does not have the support to reflect the changes in DataBase. However, this can be done by manually whenever the changes are modified in the appointment at run time by using the ItemChanged event. In that event, the CurrentItem property holds the modified changes and the modified changes can be pushed to DataBase manually. We created a simple sample as per your scenario and please make use of the below code and sample,   
   
Code example   
   
//Event triggering   
this.scheduleControl1.ItemChanged += ScheduleControl1_ItemChanged;   
   
//Event customization   
private void ScheduleControl1_ItemChanged(object sender, ScheduleAppointmentEventArgs e)   
{   
    BindingSource Bnd1 = new BindingSource();   
    Bnd1.DataSource = SimpleArrayListProvider.data;   
    //To get the modified row.   
    int rowNo = Bnd1.Find("UniqueID", e.CurrentItem.UniqueID);   
    if (rowNo != -1)   
    {   
        //Update changes when the existing record modified.   
        if (e.Action == ItemAction.Edit)   
        {   
            SimpleArrayListProvider.data.Rows[rowNo]["Subject"] = e.CurrentItem.Subject;   
            SimpleArrayListProvider.data.Rows[rowNo]["Content"] = e.CurrentItem.Content;   
            SimpleArrayListProvider.data.Rows[rowNo]["StartTime"] = e.CurrentItem.StartTime;   
            SimpleArrayListProvider.data.Rows[rowNo]["EndTime"] = e.CurrentItem.EndTime;   
            SimpleArrayListProvider.data.Rows[rowNo]["Label"] = e.CurrentItem.LabelValue;   
        }   
        //Update the DB when a row is deleted.   
        else if (e.Action == ItemAction.Delete)   
        {   
            SimpleArrayListProvider.data.Rows[rowNo].Delete();   
        }   
    }   
    //Update the changes when an appointment is added.   
    else if (rowNo == -1 && e.Action == ItemAction.Add)   
    {   
        DataRow row = SimpleArrayListProvider.data.NewRow();   
        row["Subject"] = e.CurrentItem.Subject;   
        row["Content"] = e.CurrentItem.Content;   
        row["StartTime"] = e.CurrentItem.StartTime;   
        row["EndTime"] = e.CurrentItem.EndTime;   
        row["Label"] = e.CurrentItem.LabelValue;   
        row["UniqueID"] = e.CurrentItem.UniqueID;   
        SimpleArrayListProvider.data.Rows.Add(row);   
    }   
}   
  
   
   
Regards,   
Arulpriya   


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.

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

;