.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> Windows Form Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Code to Sort GridView in VB.NET

Posted By:Santosh       Posted Date: October 20, 2009    Points: 10    Category: Windows Form Controls    URL: http://www.dotnetspark.com  

plz follow below example to sort GridView in Run Time

        Dim MyDataView As New DataView
        MyDataView = ds.Tables(0).DefaultView 'ds is dataset u need to bind first
        MyDataView.Sort = "SortColumnName"
        'SortColumnName is the name of the columnName of DataGridView you want to sort.
        DGVFindList.DataSource = MyDataView 'DGVFindList is GridView Name



Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend