' Custom Sorting
Me.ultraGanttView1.CalendarInfo.Tasks.SortedFields.Comparer = New MySortComparer ()
Public Class MySortComparer
Implements System.Collections.Generic.IComparer(Of Task)
#Region "IComparer Members"
Public Function Compare(ByVal x As Task, ByVal y As Task) As Integer
Dim xTask As Task = DirectCast(x, Task)
Dim yTask As Task = DirectCast(y, Task)
'TODO: Logic to compare Task Fields. e.g:
Return xTask.Deadline.CompareTo(yTask.Deadline)
End Function
#End Region "IComparer Members"
End Class