In the gridview control set the AllowSorting property to true
<asp:GridView runat="server" ID="gvItems" AllowSorting="true" ...>
In the HeaderTemplate of the column you wish to sort set the SortExpression property to the field the tempate is bound to, if your not using a HeaderTemplate and using a BoundField there should also be a SortExpression property
<asp:TemplateField SortExpression="ItemDescription" HeaderText="Item">...
Implement the OnSorting method
Inside of OnSorting use the second paramerter (GridViewSortEventArgs) to know what the sort expression is and rebind your gridview
protected void gv_Sorting(object sender, GridViewSortEventArgs e)
{
string fieldToSortOn = e.SortExpression;
//implement sort logic on datasource...
}
That should get you a good start