我正在添加列grid-view dynamically
DataTable dt1 = new DataTable();
dt1.Columns.Add("Item Title", typeof(string));
dt1.Columns.Add("Unit Pack", typeof(string));
dt1.Columns.Add("Pack", typeof(string));
gv1.DataSource = dt1;
gv1.DataBind();
delete button automatically
并添加
<asp:GridView ID="gv" runat="server">
<Columns>
<asp:CommandField ShowDeleteButton="true" />
</Columns>
</asp:GridView>
它显示了gridview
| Delete | Item Title | Unit Pack | Pack |
现在我想在最后一列显示删除按钮
| Item Title | Unit Pack | Pack | Delete |
我怎样才能做到这一点?如何在最后一列创建删除按钮?