#Region " CreateOwnersDataTable"
Private Function CreateOwnersDataTable() As DataTable
Dim newTable As New DataTable()
'Basic Owner properties
' In order to function properly, the table must contain data for
' the Owners Key. Keys are required for an Owner.
newTable.Columns.Add("Key", GetType(String))
newTable.Columns("Key").Unique = true
'Other Owner properties
newTable.Columns.Add("Name", GetType(String))
newTable.Columns.Add("EmailAddress", GetType(String))
newTable.Columns.Add("Visible", GetType(Boolean))
'Unlike Appointments, the Owner properties are all covered by
'individual members. But we could save space in the database by storing
'data as binary imports AllProperties and not binding the other fields.
newTable.Columns.Add("AllProperties", GetType(Byte()))
Return newTable
End Function
#End Region
#Region " SetOwnerBindings "
'Set the Data Bindings for Owners
Private Sub SetOwnerBindings()
' DataSource & DataMember
Me.ultraCalendarInfo1.DataBindingsForOwners.SetDataBinding(Me.scheduleData, "Owners")
' Set the BindingContextControl so the component will use the same context
' that the grid and any other controls on the form are using.
Me.ultraCalendarInfo1.DataBindingsForOwners.BindingContextControl = Me
' Basic Owner properties
Me.ultraCalendarInfo1.DataBindingsForOwners.KeyMember = "Key"
Me.ultraCalendarInfo1.DataBindingsForOwners.NameMember = "Name"
Me.ultraCalendarInfo1.DataBindingsForOwners.EmailAddressMember = "EmailAddress"
Me.ultraCalendarInfo1.DataBindingsForOwners.VisibleMember = "Visible"
' All other properties
Me.ultraCalendarInfo1.DataBindingsForOwners.AllPropertiesMember = "AllProperties"
End Sub
#End Region 'SetOwnerBindings