DB에 대한 쿼리를 기반으로 채울 수있는 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>