我有一个 ASP:Gridview 生成选择列,即使 AutoGenerateSelectButton =“false”。这是声明:
<asp:GridView ID="grdAssessments" runat="server"
AutoGenerateColumns="False"
CssClass="gridview"
AlternatingRowStyle-CssClass="even"
AutoGenerateSelectButton="false"
DataKeyNames="ReportId"
AllowSorting="True" Width="1000px"
OnSelectedIndexChanging="grdAssessments_SelectedIndexChanging"
OnSorting="grdAssessments_Sorting"
OnRowCommand="grdAssessments_RowCommand"
OnRowDataBound="grdAssessments_RowDataBound">
<AlternatingRowStyle CssClass="even" />
<Columns>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<a href="javascript:void(0);"
onclick="showEmployeeEdit('<%# Eval("EmployeeNumber") %>')" title="Edit">Edit</a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DateCreated" SortExpression="DateCreated">
<ItemTemplate>
<asp:Label ID="lblDateCreated" runat="server" />
</ItemTemplate>
</asp:TemplateField>
...
</Columns>
</asp:GridView>
这是生成的gridview ...与我想摆脱的Select列。