0条评论
还没有人评论过~
protected void Page_Load(object sender, EventArgs e) { Tuan.BLL.MerchantInfo merBLL = new Tuan.BLL.MerchantInfo(); DataTable table = merBLL.GetList("ID=" + 3).Tables[0]; DetailsView1.DataSource = table; DetailsView1.DataBind(); } protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { DetailsView1.DefaultMode = DetailsViewMode.Edit; } <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" onmodechanging="DetailsView1_ModeChanging"> <Fields> <asp:CommandField ShowEditButton="True" /> </Fields> </asp:DetailsView>
为什么我的detailView点击编辑的时候进入不了编辑的状态?
像WinForm里的DataGridView是有 是否可编辑 这样的属性的