Bind WebScheduler to WebService

ISDataSource is used to bind data to WebScheduler. It would be easier if the DataSet or custom object is available at design-time, because you can configure ISDataSource using ISDataSource.NET Designer. However, when you use WebService to retrieve the data, the schema is retrieved at runtime.

Assuming that you already implemented the methods that return the data needed (in this sample: WebService.cs), here is how to bind WebScheduler to WebService.

Create a new WebForm, and drag WebScheduler and ISDataSource from ToolBox.

For complete usability, WebScheduler requires 5 tables bound, which are Resources, Categories, Events, RecurringEvents, and RecurrenceInfo. At minimum, two tables should be bound to WebScheduler: Resources and Events. Open ISDataSource.NET Designer, press Next in Choose Schema Definition page. In Define Data Methods page, create new table and named it Resources.

ISDataSource.NET Designer - Define Data Methods page

ISDataSource.NET Designer - Define Data Methods page

In Choose a business object section, uncheck “Show only data components” checkbox, and choose the class from the dropdown. In this sample, the class is WebService. If your class is not listed in the dropdown, try to build the web project and remove unnecessary assemblies from Bin folder.

In the tab below, choose your methods for Select, Insert, Update, Delete actions. Do the same to other tables. In this sample, only Resources and Events tables are added.
ISDataSource.NET Designer

ISDataSource.NET Designer

Press Finish.

In ISDataSource Properties window, set ConflictDetection property to CompareAllValues.

Configure DataBindings property in WebScheduler and run the page.

WebScheduler bound to WebService

WebScheduler bound to WebService

WebScheduler is now bound to WebService. For the complete sample, please download here.

Leave a Reply