MindFusion.Scheduling for Silverlight Programmer's Guide
Grouping

Views that can be grouped: Timetable / Week Range / List / Resource. The other views do not support grouping.

In order to enable grouping the following steps should be done:

The following code illustrates how to enable grouping by contacts:

C#  Copy Code

// Define two contacts to group by
Contact c1 = new Contact();
c1.FirstName = "John";

Contact c2 = new Contact();
c2.FirstName = "Jack";

// Add the contacts to the schedule
calendar.Schedule.Contacts.Add(c1);
calendar.Schedule.Contacts.Add(c2);

// Select these contacts for grouping by adding them to
// the appropriate Calendar collection
calendar.ItemContacts.Add(c1);
calendar.ItemContacts.Add(c2);

// Enable grouping by contacts
calendar.GroupType = GroupType.GroupByContacts;

Visual Basic  Copy Code

' Define two contacts to group by
Dim c1 As New Contact()
c1.FirstName = "John"

Dim c2 As New Contact()
c2.FirstName = "Jack"

' Add the contacts to the schedule
calendar.Schedule.Contacts.Add(c1)
calendar.Schedule.Contacts.Add(c2)

' Select these contacts for grouping by adding them to
' the appropriate Calendar collection
calendar.ItemContacts.Add(c1)
calendar.ItemContacts.Add(c2)

' Enable grouping by contacts
calendar.GroupType = GroupType.GroupByContacts

The text displayed in the header of the corresponding resource depends on the type of the resource and is as follows:

Grouping and Appearance