This question is locked. New answers and comments are not allowed.
Hi,
I've looked through the threads on these forums, and have yet to be able to solve my problem of DateTime sorting. What I have so far is this:
Then in my code behind I have this:
The columns are still not sorting.
Thanks,
Jonathon
I've looked through the threads on these forums, and have yet to be able to solve my problem of DateTime sorting. What I have so far is this:
<
telerik:RadGridView
x:Name
=
"tasksRadGridView"
RowStyleSelector
=
"{StaticResource IsCompletedTaskStyle}"
SelectedItem
=
"{Binding SelectedTask, Mode=TwoWay}"
ItemsSource
=
"{Binding Tasks}"
Style
=
"{StaticResource TasksGridViewStyle}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Subject"
DataMemberBinding
=
"{Binding Subject}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Date Created"
UniqueName
=
"DateCreated"
IsSortable
=
"True"
DataMemberBinding
=
"{Binding StartTime}"
IsReadOnly
=
"True"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
Then in my code behind I have this:
public TasksTabGridView()
{
InitializeComponent();
var column = this.tasksRadGridView.Columns["DateCreated"] as GridViewDataColumn;
if(column != null)
{
column.DataType = typeof (DateTime);
}
}
The columns are still not sorting.
Thanks,
Jonathon