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

[Solved] problem sorting RadGridView columns

3 Answers 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ying
Top achievements
Rank 1
Ying asked on 19 Apr 2013, 08:59 PM
I have binded a List to the RadGridView. can not sort the columns.
<telerik:RadGridView telerik:Theming.Theme="Office_Blue" x:Name="dg_feature_asbuilt_sort" Grid.Row="20" AutoGenerateColumns="False" Margin="5,5,5,0" MaxHeight="500">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Attributes[Drawing_Id]}" Header="Drawing ID"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Atrributes[Block]}" Header="Block"/> </telerik:RadGridView.Columns>
</telerik:RadGridView>

Attache is the result i got when running the app. you can see the columns are not sortable. is there anything i need to set in the xaml or code behind?

 

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 Apr 2013, 08:04 AM
Hello,

Please note that the Type of the property which you want to sort on should implement IComparable. What are the types of the properties you have bound to (Attributes[Drawing_Id] and Atrributes[Block])?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ying
Top achievements
Rank 1
answered on 22 Apr 2013, 08:33 PM
I have binded a List<Esri.ArcGIS.Client.graphic>
does the gridview support sorting on that? thanks
0
Dimitrina
Telerik team
answered on 23 Apr 2013, 07:03 AM
Hello,

Does the "Esri.ArcGIS.Client.graphic"  implement IComparable?
 

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Ying
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Ying
Top achievements
Rank 1
Share this question
or