我有一個ASP:即使AutoGenerateSelectButton =「false」生成選擇列的Gridview。這是聲明: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 ...與我想擺脫選擇列。
沒有。那不是。 – 2013-03-28 20:26:32