Grid View Sorting issue.

musman007

New member
Joined
May 21, 2009
Messages
2
Programming Experience
Beginner
Hey,
I am facing issue soring my grid view on date column in ascending order.
Please help.

Thankx




Private Sub SortGridView(ByVal dt As DataTable, ByVal col As String)
dt.DefaultView.Sort = col & " DESC"
GridView1.DataSource = dt
End Sub

Where col is "date"
and dt is the data table to sort
 
First up, there are no GridView's in Windows Forms apps. The GridView is an ASP.NET web control. In WinForms we use the DataGridView.

As for the issue, what's the issue? You've told us what you want to do (good) and how you're trying to do it (good), but you haven't told us what actually happens when you do. From the information you've provided, that code is fine.
 
Back
Top