I want to sort datagrid columns ascending or descending. They always sort ascending.

How can I do descending.

This is the code I have in the Sort Command event.

VB Code:
  1. Private Sub dgrResults_SortCommand1(ByVal source As Object, ByVal e As _
  2. System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles dgrResults.SortCommand
  3.  
  4.         Dim dstStudents As DataSet = PopulateGrid()
  5.  
  6.         ' Create a DataView from the Dataset.
  7.         Dim dvwStudents As New DataView(dstStudents.Tables(0))
  8.         Try
  9.  
  10.             ' The DataView provides an easy way to sort. Simply set the
  11.             ' Sort property with the name of the field to sort by.
  12.             dvwStudents.Sort = e.SortExpression
  13.  
  14.             ' Rebind the data source and specify that it should be sorted
  15.             ' by the field specified in the SortExpression property.
  16.  
  17.             dgrResults.DataSource = dvwStudents
  18.             dgrResults.DataBind()
  19.         Catch ex As Exception
  20.             Response.Redirect(clsLib.RedirectTo(ex.Message, "Search.aspx"))
  21.         End Try
  22.  
  23.     End Sub


The PopulateGrid function returns a dataset of data.