我在一个datagrid1中又嵌套了一个datagrid2,在何处编写datagrid2的编辑、修改、删除等事件?
希望能附C#.NET的例子!谢谢!!!急急

解决方案 »

  1.   

    在html的datagrid2的内容中加入:onitemcommand="dddd"
    然后在代码中加入public void dddd(object sender,*************  e)
    其余的跟datagrid1一样了
    (********** 不记得怎么写了了)
      

  2.   

    可以勉强做到,麻烦多多
    你可以做个嵌套的控件。
    把内嵌的Datagrid的事件暴给做为容器的DataGrid
    在控件内部检查是否为内嵌的Datagrid
      

  3.   

    html:
    <asp:datagrid id="Datagrid3" runat="server" Width="832px" Font-Size="X-Small" BorderWidth="1px" GridLines="Horizontal" AutoGenerateColumns="False" BorderColor="Black" PageSize="1" AllowPaging="True" OnItemDataBound="Dg3_ItemCommand"></asp:datagrid>代码页:
    Sub Dg3_ItemCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)这样就可以了
      

  4.   

    C#的
    publi void Dg3_ItemCommand(Object sender, System.Web.UI.WebControls.DataGridCommandEventArgs e)
      

  5.   

    你在msdn里搜索一下 事件冒泡
      

  6.   

    再请教有没有用事件冒泡做的datagrid1嵌套datagrid2的例子呢???