Hi
We are using DateTime from db (Oracle db field named EnrollmentDate type Date) to class properte (Enrollment class with property EnrollmentDate) to observablecollection with that class (ObservableCollection<Enrollment>) and to asp elements.
Below are two asp parts (Bound or DateTime) which has been tested:
<
telerik:GridBoundColumn
DataField
=
"EnrollmentDate"
HeaderText
=
"EnrollmentDate"
SortExpression
=
"EnrollmentDate"
UniqueName
=
"EnrollmentDate"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter EnrollmentDate column"
></
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"EnrollmentDate"
HeaderText
=
"EnrollmentDate"
SortExpression
=
"EnrollmentDate"
UniqueName
=
"EnrollmentDate"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter EnrollmentDate column"
></
telerik:GridDateTimeColumn
>
In Class "Enrollment" that property "EnrollmentDate" is defined as follows:
public
DateTime? EnrollmentDate
{
get
{
return
_EnrollmentDate;
}
set
{
_EnrollmentDate = value;
OnPropertyChanged(
"EnrollmentDate"
);
}
}
Setting data to that class property from DB:
objEnrollments.EnrollmentDate = dr.Field<DateTime?>(
"EnrollmentDate"
);
So where is the problem point?
If there is no problem, where is your mentioned before inserting, because it crash just after clicking update/insert button and not go in any event (or I haven't find right one).
BR
Harri