title: Gridview header issue: call event on header
body: <p>Now I got this gridview, And I need the headers to be clickable, whereafter an event starts (something like OnClickHeader="header_ClickEvent"?) Ofcourse there is a SortExpression element, which enables to sort the grid, but I want to be able to start any event, like when clicking a button.</p>
  
  <p>I could not find any solution within the asp:BoundField nor asp:TemplateField...
  I thought a hyperlink could solve the problem, but that was a bit premature.
  Also, when using a TemplateField, I find it very hard to fill the column with data.
  Could anyone bring me the solution?</p>
  
  <p>The Gridview:</p>
  
  <pre><code>&lt;asp:GridView CssClass="gridview" ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Student_key" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" PagerSettings-Visible="false" PageSize="14"&gt;
  
                                      &lt;HeaderStyle CssClass="headerstyle" /&gt;
                                      &lt;RowStyle CssClass="rowstyle"/&gt;
                                      &lt;AlternatingRowStyle CssClass="altrowstyle" /&gt;
                                      &lt;Columns&gt;
                                          &lt;asp:BoundField DataField="Studentnumber" HeaderText="Studentnummer" &gt;
                                              &lt;HeaderStyle CssClass="header100" /&gt;
                                          &lt;/asp:BoundField&gt;
                                          &lt;asp:BoundField DataField="Prefix" HeaderText="Voorletters" &gt;
                                              &lt;HeaderStyle CssClass="header75" /&gt;
                                          &lt;/asp:BoundField&gt;
                                          &lt;asp:BoundField DataField="prename" HeaderText="Voornaam" SortExpression="Voornaam"&gt;
                                              &lt;HeaderStyle CssClass="header75" /&gt;
                                          &lt;/asp:BoundField&gt;
                                          &lt;asp:BoundField DataField="nickname" HeaderText="Roepnaam" &gt;
                                              &lt;HeaderStyle CssClass="header100" /&gt;
                                          &lt;/asp:BoundField&gt;
                                          &lt;asp:BoundField DataField="insertion" HeaderText="Tussenvoegsel" &gt;
                                              &lt;HeaderStyle CssClass="header100" /&gt;
                                          &lt;/asp:BoundField&gt;
                                          &lt;asp:BoundField DataField="surname" HeaderText="Achternaam"&gt;
                                              &lt;HeaderStyle CssClass="header100" /&gt;
                                          &lt;/asp:BoundField&gt;
                                          &lt;asp:CommandField SelectText="show results" ShowSelectButton="True" &gt;
                                              &lt;HeaderStyle CssClass="header100" /&gt;
                                          &lt;/asp:CommandField&gt;
  
                                      &lt;/Columns&gt;
                                      &lt;EmptyDataTemplate &gt;There are no results shown, please try again.&lt;/EmptyDataTemplate&gt;
  
                                  &lt;/asp:GridView&gt;
  </code></pre>