title: How to sort a GridView with a ColumnHeader click when AutoGenerateColumns="true"
body: <p>I have a gridview with AutoGenerateColumns="true" (in general I don't know what the columns will be). Is there any easy way to sort the grid by clicking on a column header? The only solutions I have found so far are for when AutoGenerateColumns="false"</p>
  
  <p>Alternatively if I know one of the columns is going to be called <code>StatusId</code> is there a way to sort on this column only?</p>
  
  <p><strong>Edit:</strong>
  I am manually updating the gridview's HeaderRow to make them more user friendly, this seems to be knocking things out.  Is there a way to get round this?</p>