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.
Unfortunately, activation email could not send to your email. Please try again.

Need know Schedule Control changes and DB Structure.

Thread ID:

Created:

Updated:

Platform:

Replies:

131904 Aug 2,2017 09:07 AM Aug 3,2017 11:29 AM Windows Forms 1
loading
Tags: ScheduleControl
Dhairya Joshi
Asked On August 2, 2017 09:07 AM

Hi Experts,

I am working on a project of Gaming Shop where they are pre-booking the systems for the clients and I am pretty sure I can use schedule control for it. But first thing I am not aware about the DB Structure for the Control, how it stores the data how to retrieve it back (CRUD Operations). And Is there any way I can use the control with .Net Framework 4.0? Following are some more questions if you can provide me solutions:

1) I want a customized screen which should pop up where you can write down the customer name(DropDown) and selected game they are going to play(DropDown) is there any way I can customize it. Rest of the details that is fine like start and end date,reminder color codes and etc.

2) I want to display only the current month on the left side navigation frame.

3) Most of the times I will only use the Day based view of this control.

I am learning to use Schedule control using the given documentation but what i want is something as above,

Development environment : .Net Framework 4.0, Visual Studio 2012 and SQL Server 2008 R2. Please suggest according to that.

Please advice on this scenario so that I can go further with my development.

Thank You,

Mohanraj Gunasekaran [Syncfusion]
Replied On August 3, 2017 11:29 AM

 Hi Dhairya, 

Thanks for using Syncfusion product. 

Query 
Solution 
first thing I am not aware about the DB Structure for the Control, how it stores the data how to retrieve it back (CRUD Operations). 

By default, Schedule control does not have the direct support to bind the data from DB. If you want to generate the appointment based on the DB data, you can create the appointment based on the DB data using StartTime and EndTime property. Please refer to the below code example, 

Code example 
public static SimpleScheduleAppointmentList InitializeRandomData() 
{ 
SimpleScheduleAppointmentList masterList = new SimpleScheduleAppointmentList(); 
DateTime now = DateTime.Now.Date; 
 
for(int i = 0; i < count; ++i) 
{ 
                ScheduleAppointment item = masterList.NewScheduleAppointment() as ScheduleAppointment; 
                                                                                                                                                                                                 
                item.StartTime = dataset.Tables[0].Rows[i]["StartTime"]; 
                item.EndTime = dataset.Tables[0].Rows[i]["EndTime"]; 
                item.Subject = dataset.Tables[0].Rows[i]["Subject"]; 
                item.Content = dataset.Tables[0].Rows[i]["Content"]; 
                item.LabelValue = dataset.Tables[0].Rows[i]["LabelValue"];                masterList.Add(item); 
} 
} 
 
SimpleScheduleDataProvider dataProvider = new SimpleScheduleDataProvider(); 
dataProvider.MasterList = SimpleScheduleDataProvider.InitializeRandomData(); 
scheduleControl1.DataSource = dataProvider; 
 
Is there any way I can use the control with .Net Framework 4.0? 
Yes, ScheduleControl does have the support in .NetFrameWork 4.0  
 I want a customized screen which should pop up where you can write down the customer name(DropDown) and selected game they are going to play(DropDown) is there any way I can customize it. Rest of the details that is fine like start and end date,reminder color codes and etc. 

In order to create the custom AppointForm to add the appointments in ScheduleControl, you can use the ShowingAppointForm event to handle the default AppointMentForm. Please refer the below code example and the KB link, 

Code example 
this.scheduleControl1.ShowingAppointmentForm += scheduleControl1_ShowingAppointmentForm; 
 
void scheduleControl1_ShowingAppointmentForm(object sender, ShowingAppointFormEventArgs e) 
{ 
    e.Cancel = true; 
    //Shows the Custom appointment form. 
    form.ShowDialog(); 
 
} 
 
 
Please refer the below KB link to customize Label and Marker color, 
 
Please refer the below UG link for more customization 
 
I want to display only the current month on the left side navigation frame. 

In order to display the current month only in navigation frame, you can use the CalendarGrid.RowCount property. Please refer to the below code example , 

Code example 
this.scheduleControl1.GetScheduleHost().Calendar.CalenderGrid.RowCount = 6; 
 
Most of the times I will only use the Day based view of this control. 

In order to use the day view, you can use the ScheduleType property. Please refer to the below code example, 
 
Code example 
this.scheduleControl1.ScheduleType =  ScheduleViewType.Day; 
 
 

Sample link: ScheduleControl 
 
Note: 
If you want to refresh the appointments, you can use the SetDataToDayPanels method. Please refer to the below code example, 
Code example 
this.scheduleControl1.GetScheduleHost().SetDataToDayPanels(); 
 

Regards, 
Mohanraj G 


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.

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.

;