The following steps helps you to mirror the appointments of first Schedule into second Schedule.
Step1: Create an ASP.NET application and include the EJWEB Schedule control in it by referring to this link.
Step2: Create a database table with the necessary fields as follows.
[SQL Table Script]
Note: You can create the table in Visual Studio itself as a local database or use SQL Server Management Studio.
Step3: Connect database to the Schedule control by using SqlDataSource ASP.NET control as shown below.
Step 4: Add the connectionString configuration to the Web.Config page as highlighted in the following code.
Note: Change the ConnectionString value based on your database connection. Here, it is mentioned as the “local database” connection string.
Step 5: Make use of the following server-side events of the Schedule control to perform the CRUD operation. Here, each event is assigned a server-side method name to be invoked at the time of a particular action.
Step 6: Render another Scheduler (depicted with the id Schedule2) in the same page as shown in the below code example.
Step 7: Make use of the server-side event Navigation in Schedule1 and assign the method name (onNavigation) to it which gets invoked on every time the scheduler date or view is navigated back and forth. Within this method, assign the current view and date range of the first Scheduler to the second Scheduler (which acts as a mirror Schedule) as shown in the below code example.
Step 8: Define the server-side methods with appropriate code blocks to connect the dataSource to both the Scheduler as shown in the below code-behind page example.
Step 9: Run the sample. Now, you can perform insert, edit, and delete operations on the schedule appointments that simultaneously reflects in the SQL database as well as in the second Scheduler (Mirror Schedule).
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
|6790||05/04/2016||05/04/2016||ASP.NET Web Forms||Schedule|