Hey folks, hope someone can help me out with this.
I am binding a dynamic generated list to a datagrid (runtime column generation = on / No Bound Columns)
and one of the columns is a date column which results in this "nasty"
"BirthDate" Column
05.05.1967 00:00:00
11.05.1964 00:00:00
01.03.1997 00:00:00
...
like this.. How can I supress the Time in this "date" column?
my code for the dynamic list looks like this:
Shared Function ListCustomers(ByVal umo001nr As Integer, ByVal maxrows As Int32) As DataTable
Dim filterbucket As RelationPredicateBucket
Dim adapter As DataAccessAdapter
Dim table As DataTable
Dim fields As ResultsetFields
Try 'fetch typedlist related to the filterentity
table = New DataTable
fields = New ResultsetFields(11)
fields.DefineField(Umo301FieldIndex.Nummer, 0, "NUMMER")
fields.DefineField(Umo301FieldIndex.Naamweergave, 1, "NAME")
fields.DefineField(Umo300FieldIndex.Adres, 2, "ADRESSE")
fields.DefineField(Umo300FieldIndex.Postcode, 3, "PLZ")
fields.DefineField(Umo181FieldIndex.Omschr, 4, "ORT")
fields.DefineField(Umo300FieldIndex.Telefoondbs, 5, "TELEFON")
fields.DefineField(Umo301FieldIndex.Geboortedatum, 6, "GEBDATUM")
fields.DefineField(Umo301FieldIndex.Geslacht, 7, "GESCHLECHT")
fields.DefineField(Umo110FieldIndex.Omschr, 8, "STATUS")
fields.DefineField(Umo301FieldIndex.Umo200Code, 9, "CODE")
fields.DefineField(Umo301FieldIndex.Umo300Nr, 10, "WOHNUNG")
filterbucket = New RelationPredicateBucket
filterbucket.PredicateExpression.Add(PredicateFactory.CompareValue(Umo301FieldIndex.Umo001Nr, ComparisonOperator.Equal, umo001nr))
filterbucket.Relations.Add(Umo301Entity.Relations.Umo300EntityUsingUmo300NrUmo001Nr)
filterbucket.Relations.Add(Umo301Entity.Relations.Umo110EntityUsingUmo110NrUmo001Nr)
filterbucket.Relations.Add(Umo300Entity.Relations.Umo181EntityUsingUmo181NrUmo001Nr)
filterbucket.Relations.ObeyWeakRelations = True
adapter = New DataAccess.DatabaseSpecific.DataAccessAdapter(False)
adapter.FetchTypedList(fields, table, filterbucket, maxrows, False)
table.TableName = "CustomersTable"
Catch ex As Exception
Finally
adapter.CloseConnection()
adapter.Dispose()
End Try
Return table
End Function