Hello,
I have a gridview that has a column that needs sorting. Every column that I want to sort does sort except one. The gridview's ItemsSource is an ICollectionView.
Please help me figure out why the "My Overrides" is not sorting.
I have a gridview that has a column that needs sorting. Every column that I want to sort does sort except one. The gridview's ItemsSource is an ICollectionView.
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"My Overrides"
IsSortable
=
"True"
SortMemberPath
=
"Overrides"
DataMemberBinding
=
"{Binding HasOverrides}"
>
<!-- DOES NOT SORT-->
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Button
x:Name
=
"ViewButtonOverrides"
Click
=
"ShowOverridePrompt"
Cursor
=
"Hand"
Content
=
"My Overrides"
IsEnabled
=
"{Binding HasOverrides}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"TicketStatus"
x:Name
=
"TicketStatus"
SortMemberPath
=
"TicketStatus.TicketStatusID"
>
<!-- SORTS FINE -->
<
telerik:GridViewDataColumn.HeaderCellStyle
>
<
Style
TargetType
=
"telerik:GridViewHeaderCell"
>
<
Setter
Property
=
"ContentTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
CheckBox
x:Uid
=
"CheckBox_11"
Grid.Row
=
"0"
Grid.Column
=
"0"
Checked
=
"CheckBox_TicketStatusesOnChecked"
Unchecked
=
"CheckBox_TicketStatusesOnUnchecked"
IsChecked
=
"False"
DataContext
=
"{Binding DataContext, ElementName=LayoutRoot}"
Visibility
=
"{Binding TicketStatusVisiblity, Mode=TwoWay}"
/>
<
TextBlock
Margin
=
"0,0,0,-1"
TextWrapping
=
"Wrap"
Text
=
"Ticket Status"
d:LayoutOverrides
=
"Width, Height"
Foreground
=
"#FF4C607A"
/>
</
StackPanel
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:GridViewDataColumn.HeaderCellStyle
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Grid
x:Uid
=
"Grid_6"
>
<
Grid.RowDefinitions
>
<
RowDefinition
x:Uid
=
"RowDefinition_22_1"
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
x:Uid
=
"ColumnDefinition_8_1"
Width
=
"20"
/>
<
ColumnDefinition
x:Uid
=
"ColumnDefinition_9_1"
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
CheckBox
x:Uid
=
"CheckBox_2"
Visibility
=
"{Binding TicketStatusHasVisiblity, Mode=TwoWay}"
Grid.Row
=
"0"
Grid.Column
=
"0"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Bottom"
IsChecked
=
"{Binding TicketStatusSelected, Mode=TwoWay}"
Checked
=
"CheckBox_TicketStatusOnChecked"
Unchecked
=
"CheckBox_TicketStatusOnUnchecked"
AutomationProperties.AutomationId
=
"CheckBox_2"
/>
<
Image
x:Uid
=
"Image_5"
Grid.Row
=
"0"
Grid.Column
=
"0"
Height
=
"12"
Width
=
"12"
Visibility
=
"{Binding TicketStatusImageHasVisiblity, Mode=TwoWay}"
Source
=
"{Binding TicketStatusImagePath}"
/>
<
TextBlock
x:Uid
=
"TextBlock_1"
Grid.Row
=
"0"
Grid.Column
=
"2"
TextWrapping
=
"Wrap"
VerticalAlignment
=
"Bottom"
Text
=
"{Binding TicketStatus, Mode=TwoWay}"
AutomationProperties.AutomationId
=
"TextBlock_1"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding MasterID}"
SortMemberPath
=
"MasterID"
Header
=
"ID"
IsReadOnly
=
"True"
/>
<!-- SORTS FINE -->
</
telerik:RadGridView.Columns
>
Please help me figure out why the "My Overrides" is not sorting.