我有一个基于查询到数据库填充的gridview。我试图在我的gridview上添加排序,但是我无法让我的列标题可点击。我已经允许排序设置为true,并且我有我的OnSorting事件集。我的专栏有几种不同的类型。我知道我需要在我的代码背后的代码,但由于某种原因,我无法点击标题。任何帮助我失去了什么将不胜感激。我不能让我的gridview点击的标题能够排序
<asp:GridView ID="Grid1" runat="server"
AutoGenerateColumns="False"
OnSelectedIndexChanging="Selected_Row_Changing"
DataKeyNames="ApplicationId"
AllowPaging="True"
OnPageIndexChanging="Grid1_PageIndexChanging"
AllowSorting="True"
OnSorting="Grid1_Sorting"
OnRowCreated="OnRowCreated"
OnRowCommand="Grid1_RowCommand"
OnRowDataBound="Grid1_RowDataBound">
<Columns>
<asp:templatefield ...>
<itemtemplate>
<asp:linkbutton .../>
</itemtemplate>
</asp:templatefield>
<asp:BoundField ... />
<asp:HyperLinkField ... />
<asp:ButtonField ... />
</Columns>
</asp:GridView>