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

How to create CustomGrouping in SfSchedule?

CustomGrouping is used to group the schedule appointments based on the resources you select. By using CustomGrouping you can add the same appointment for multiple resources simultaneously. This article explains on how to group the appointments based on the resource.

Creating CustomGrouping

  1. Create a WinRT application and add the SfSchedule control to it. Add resources in the ScheduleResourceTypeCollection and create buttons to change the resource type dynamically by using the button click event as illustrated in the following code example.

XAML

In the above code, two types of resources are used.

TV

  • StarSports
  • ESPN
  • TenSports

Programs

  • FootBall
  • Cricket
  • News

C:\Users\ApoorvahR\Desktop\Note.pngNote: In the above code example the value of DayHeaderOrder property is OrderByDate that is used to display multiple resources in each day. You can also set OrderByResouce value for the same property where each Resource displays the schedule appointments in all the week days.

  1. Create appointments collections and group the appointments by using the GetFilterCollection method as illustrated in the following code example.

C#

C:\Users\ApoorvahR\Desktop\Note.pngNote: In the above code example, in GetFilterCollection method both the resources, TV and Program are added in a same appointment by using the ResourceCollection property. When the resource of the schedule is changed to any other type, the same appointment is used to display.

  1. When the resource type is Programs, then the appointments gets filtered based on the resource name as in the above code example.

C:\Users\ApoorvahR\Desktop\Note.pngNote: For example when the resource name is FootBall, then the appointments are related on football.

  1. The default resource type is Television, where each resource has the appointments of all the three programs, such as football, cricket and news. When you change the resource type as Programs, then the appointments are filtered and each resource has the appointments related to the same resource name.

The following screenshots display the schedule appointments based on the resource type.

Figure 1: Appointments based on resource type of Television (in week view)

Figure 2: Filtered Appointments in the resource type of Programs (in week view)

Sample Link

CustomGrouping_WinRT.zip

Article ID: Published Date: Last Revised Date: Platform: Control:
4281 03/11/2015 03/23/2015 WinRT SfSchedule
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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