This question is locked. New answers and comments are not allowed.
Sorting on Object columns doesn't seem to work. To recreate the problem:
Is this a bug or am I missing something?
- Paste the following code into the code behind of MainPage in a blank silverlight project
- Run the application
- Click on the header of the Name column (which is of type Object) - this does NOT work
- Click on the header of the NameString column (which is of type String) - this does work
Is this a bug or am I missing something?
Partial Public Class MainPage
Inherits UserControl
Public Sub New()
InitializeComponent()
Dim RadGridView1 As New Telerik.Windows.Controls.RadGridView
RadGridView1.AutoGenerateColumns = False
RadGridView1.Columns.Add(New GridViewDataColumn With {.DataMemberBinding = New Binding("Name"), .Header = "Name"})
RadGridView1.Columns.Add(New GridViewDataColumn With {.DataMemberBinding = New Binding("NameString"), .Header = "NameString"})
RadGridView1.ItemsSource = GetListData()
LayoutRoot.Children.Add(RadGridView1)
End Sub
Private Function GetListData() As List(Of Item)
Dim build As New List(Of Item)
build.Add(New Item With {.Name = "Tom", .NameString = "Tom"})
build.Add(New Item With {.Name = "Fred", .NameString = "Fred"})
build.Add(New Item With {.Name = "Bill", .NameString = "Bill"})
Return build
End Function
Public Class Item
Public Property Name As Object
Public Property NameString As String
End Class
End Class