'''
''' Override the ${Field Control}_Click to customize the sort order
'''
Public Overrides Sub ${Field Control}_Click(ByVal sender As Object, ByVal args As EventArgs)
Dim sd As OrderByItem = Me.CurrentSortOrder.Find(${${Database Table}ClassName}.${Field Name})
If Not sd Is Nothing Then
sd.Reverse()
Else
Me.CurrentSortOrder.Reset()
'Set the sort order for the selected field
Me.CurrentSortOrder.Add(${${Database Table}ClassName}.${Field Name}, BaseClasses.Data.OrderByItem.OrderDir.Desc)
End If
Me.DataChanged = True
End Sub
|