I have a datagridview with its datasource binded to a List(Of T). Now i would like to sort on any of the columns.
My code:
'Database access : items = List(BlogPost)
dgBlogPosts.DataSource = items
'My BlogPost Class
Public Class BlogPost
    Public Property ID As Integer
    Public Property Title As String
    Public Property Content As String
    Public Property CreationDate As DateT开发者_运维百科ime
    Public Property Rating As Decimal = 5.0
End Class
Take a look at this example which recommends using a BindingList instead and then a bit of code to enable sorting. There is also this on codeproject.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论