New to Telerik UI for WPF? Download free 30-day trial

Cannot group, sort and filter a specific column

PROBLEM

You cannot sort, group and/or filter a column even if the all three properties are true: CanUserSortColumns, IsFilteringAllowed, ShowGroupPanel.

CAUSE

Probably you are using a CellTemplate for that particular column and you have not specified the DataMemberBinding property of it like this:

<telerik:GridViewDataColumn Header="FirstName" > 
    <telerik:GridViewDataColumn.CellTemplate> 
        <DataTemplate> 
            <TextBlock Text="{Binding FirstName}" /> 
        </DataTemplate> 
    </telerik:GridViewDataColumn.CellTemplate> 
</telerik:GridViewDataColumn> 
SOLUTION

Set the DataMemberBinding property of the column to the field that you want the gridview to sort, group and filter on.

<telerik:GridViewDataColumn Header="FirstName" DataMemberBinding="{Binding FirstName}" > 
    <telerik:GridViewDataColumn.CellTemplate> 
        <DataTemplate> 
            <TextBlock Text="{Binding FirstName}" /> 
        </DataTemplate> 
    </telerik:GridViewDataColumn.CellTemplate> 
</telerik:GridViewDataColumn> 
In this article