This question is locked. New answers and comments are not allowed.
I have collection of student bind to RadDataGrid. The following code doesn't sort father name column, but it showing arrow icon in column header.
01.
public
class
Student
02.
{
03.
public
int
Id {
get
;
set
; }
04.
public
string
Name {
get
;
set
; }
05.
public
Parent Parent {
get
;
set
; }
06.
}
07.
public
class
Parent
08.
{
09.
public
int
Id {
get
;
set
; }
10.
public
string
FatherName {
get
;
set
; }
11.
public
Parent FatherJob {
get
;
set
; }
12.
}
01.
<
telerikGrid:RadDataGrid
ItemsSource
=
"{Binding Students}"
AutoGenerateColumns
=
"False"
>
02.
<
telerikGrid:RadDataGrid.Columns
>
03.
<
telerikGrid:DataGridTemplateColumn
CanUserSort
=
"True"
Header
=
"Father"
>
04.
<
telerikGrid:DataGridTemplateColumn.CellContentTemplate
>
05.
<
DataTemplate
x:DataType
=
"model:Student"
>
06.
<
TextBlock
Text
=
"{x:Bind Parent.FatherName}"
/>
07.
</
DataTemplate
>
08.
</
telerikGrid:DataGridTemplateColumn.CellContentTemplate
>
09.
<
telerikGrid:DataGridTemplateColumn.SortDescriptor
>
10.
<
telerikCore:PropertySortDescriptor
PropertyName
=
"FatherName"
/>
11.
</
telerikGrid:DataGridTemplateColumn.SortDescriptor
>
12.
</
telerikGrid:DataGridTemplateColumn
>
13.
</
telerikGrid:RadDataGrid.Columns
>
14.
</
telerikGrid:RadDataGrid
>