1.GrdView命令列弹出对话框
     <asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_RowCommand">
            <Columns>
                <asp:ButtonField CommandName="编辑" Text="编辑" />
                <asp:ButtonField CommandName="删除" Text="&lt;div onclick=&quot;return confirm('您确实要删除该项目吗?')&quot;&gt;删除&lt;/div&gt;" />
            </Columns>
        </asp:GridView>

2.使GridView控件选中列与编辑行合为一行
      在RowEditing事件下下写如下代码:
         GridView1.SelectedIndex = e.NewEditIndex

3.向动态增加控件页面
   ◎先new一个控件;◎Control frm = this.FindControl("form1");◎frm.Controls.Add(控件ID)

http://java.mblogger.cn/edgar001

相关文章:

  • 2021-12-27
  • 2021-07-02
  • 2021-09-21
  • 2021-10-22
  • 2021-05-19
  • 2022-12-23
  • 2021-11-02
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-03-09
  • 2022-12-23
  • 2021-12-02
相关资源
相似解决方案