I have what I think should be an easy question.
I have a database field which stored the timestamp. (date and time).
I want to display the timestamp as 2 columns, upload date and upload time. (please see below)
To do this I simply bind my timestamp db field (AddedDate) to both GridView columns and then apply a date format to the first one and a time format to the second one.
The problem is that when I click on the filter for the "upload date", I get the same value in the filter multiple times. It looks like this is due to the fact that the filter is applied to the underlying field value which has a time component.
In other words, based on the data:
5/1/2011 08:30:25
5/1/2011 09:45:32
5/1/2011 10:44:33
My gridview correctly displays the previous data in 2 gridview columns. (Upload Date, Upload Time)
However, when I click on the filter for the Upload Date, I get the following:
5/1/2011
5/1/2011
5/1/2011
I do not want this. I only want 5/1/2011 displayed a single time.
Is there a way to have the Telerik Gridview filter on the displayed value and not the underlying "raw" value?
Or is there another way to handle this?
Thanks
Jim
james_williamson@nylim.com
<
telerik:RadGridView
x:Name
=
"HistoricalFilesGrid"
ItemsSource
=
"{Binding HistoricalFilesView}"
Grid.Row
=
"1"
SelectionMode
=
"Multiple"
AutoGenerateColumns
=
"False"
SizeChanged
=
"HistoricalFilesGrid_SizeChanged"
IsReadOnly
=
"True"
Filtered
=
"HistoricalFilesGrid_Filtered"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding AddedDate}"
DataFormatString
=
"{}{0:MM/dd/yyyy}"
Header
=
"Upload Date"
></
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding AddedDate, StringFormat='hh:mm'}"
Header
=
"Upload Time"
IsFilterable
=
"False"
></
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>