Sorting of the Grid View

I create a grid view with the property AutoGenerate Coloumn = true (i re-use) the grid view depend on the selection..
Please help me figure out on how to code sorting:

 Protected Sub GVGMMPage_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GVGMMPage.Sorting
My back code:
        Select Case e.SortExpression
            Case "Gmm ID"
                GVGMMPage.DataBind()
                BuildInquiryGridView()
            Case "Gmm Name"
                GVGMMPage.DataBind()
                BuildInquiryGridView()
            Case "Gmm Desc"
                GVGMMPage.DataBind()
                BuildInquiryGridView()
            Case "Effective Date"
                GVGMMPage.DataBind()
                BuildInquiryGridView()
            Case "Maint Date"
                GVGMMPage.DataBind()
                BuildInquiryGridView()
            Case "Name Maint"
                GVGMMPage.DataBind()
                BuildInquiryGridView()
        End Select
    End Sub

My Fron code:
<asp:GridView ID="GVGMMPage" runat="server" AllowSorting="True"
   BorderColor="Black" BorderStyle="Solid" >
 <Columns>
<asp:ButtonField ButtonType="Button" CommandName="Edit" Text="Edit">
 <ControlStyle CssClass="Buttons" />
 </asp:ButtonField>
 <asp:TemplateField>
 <ItemTemplate>
 <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" CssClass="Buttons"
 OnClientClick="if(!confirm('Are you sure you want to delete this record?')) return false;"
  Text="Delete" />
   </ItemTemplate>
  </asp:TemplateField>                                          
   </Columns>
   <RowStyle BackColor="White" BorderColor="#404040" />
    <HeaderStyle ForeColor="White" HorizontalAlign="Center" BackColor="#336699" BorderColor="Black"
   BorderStyle="Solid" />
  <AlternatingRowStyle BorderColor="Black" BorderStyle="Solid" BackColor="Gainsboro" />
   <SelectedRowStyle ForeColor="Pink" />
iyufaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.