This is a migrated thread and some comments may be shown as answers.

Sorting a column without SortMemberPath

1 Answer 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 09 Jan 2014, 09:55 PM
I have a RadGridView populated by a collection of objects. The first column uses a converter for the DataMemberBinding like so:

<telerik:GridViewDataColumn
    Name="NotificationTypeGridViewDataColumn"
    Header="Type"
    MinWidth="100"
    Width="100"
    IsSortable="True"
    SortingState="None"
    DataMemberBinding="{Binding Converter={StaticResource notificationTypeConverter}}"
    >
</telerik:GridViewDataColumn>

The converter returns a string based on the typeof(object) in the collection.  Since there is no property on the object I can name for the SortMemberPath to sort from, how then can I sort this GridViewDataColumn based on the string returned by the converter?  Do I have to use the "Sorting" handler and custom sort all of the columns?  Thanks.

1 Answer, 1 is accepted

Sort by
0
Don
Top achievements
Rank 1
answered on 10 Jan 2014, 12:57 AM
Bah!  Nevermind.  I just implemented a sorting method for the column.
Tags
GridView
Asked by
Don
Top achievements
Rank 1
Answers by
Don
Top achievements
Rank 1
Share this question
or