0

在 GridView 内,然后在列内我有一个绑定字段

<asp:BoundField DataField="Company Name" HeaderText="Company Name" SortExpression="Name" />

这将显示公司名称的列列表(很好),但是 headerText 是一个可点击的链接,会引发错误......我怎样才能让 headertext 显示为正常的计划不可点击标签

ta

4

3 回答 3

1

Probably because you marked the bound field to be sortable and you didn't implement the sort on the server side... probably. Remove the SortExpression and see what's happening. You should post more info starting with the exception you have.

于 2013-02-20T16:04:13.380 回答
1

只需删除 SortExpression

于 2013-02-20T16:43:53.347 回答
1

您可以使用AllowSorting="False"gridview。

  <asp:GridView AllowSorting="False">
      <asp:BoundField DataField="Company Name" HeaderText="Company Name"/>
  </asp:GridView>
于 2013-02-20T16:07:36.410 回答