1、HTML代码

<asp:GridView ID="gv_Info" runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="True" EmptyDataText="没有符合条件的数据信息" PagerSettings-Visible="false"
OnRowDataBound="gv_Info_RowDataBound" OnRowCreated="Info_RowCreated" OnSorting="gv_Info_Sorting" OnDataBound="gv_Info_DataBound">
<Columns>
<asp:BoundField HeaderText="企业代码" DataField="ENTERPRISE_CODE" SortExpression="ENTERPRISE_CODE" Visible="False" />
<asp:BoundField HeaderText="企业名称" DataField="ENTERPRISE_NAME" SortExpression="nlssort(ENTERPRISE_NAME,'NLS_SORT=SCHINESE_PINYIN_M')" />
</Columns>
<PagerStyle HorizontalAlign="Center" />
<EmptyDataTemplate>
没有符合条件的数据信息!
</EmptyDataTemplate>
</asp:GridView>
<Mes:AspNetPager ID="AspNetPager1" runat="server" OnPageChanging="AspNetPager1_PageChanging"></Mes:AspNetPager>

2、后台包含gv_Info_RowDataBound、Info_RowCreated、gv_Info_Sorting、gv_Info_DataBound几个函数

3、SortExpression字段中存放排序字符串。

05-11 18:07