我的以下代码片段不允许在 DataGrid 上进行排序:
<asp:DataGrid ID="tubewell" runat="server" AllowSorting="True"
AutoGenerateColumns="False" OnSortCommand="sortColumn"
>
<Columns>
<asp:BoundColumn DataField="tubeWell_ID" DataFormatString="#{0:c}"
HeaderText="Tubewell </br> ID"></asp:BoundColumn>
<asp:BoundColumn DataField="status" HeaderText="Status" Visible="False">
</asp:BoundColumn>
</Columns></asp:DataGrid>
以下允许:
<asp:DataGrid ID="tubewell" runat="server" AllowSorting="True"
AutoGenerateColumns="True" OnSortCommand="sortColumn"
>
</asp:DataGrid>