我是使用代码对ASPxGridView  进行的数据绑定
editfrom使用PopupEditForm我想在添加完一条记录后关闭PopupEditForm 如何实现能 一直没找到方法撒
        protected void appGrid_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            //方法
            Insert();
            int pageindex = gridPager.PageIndex;
            BindData(pageindex);
            e.Cancel = true;
                    }

解决方案 »

  1.   

    不用这个方法.直接用数据源绑定就行了.用ASPxGridView自带的事件都关闭不了PopupEditForm 发个代码你参考下
    前台 <asp:ObjectDataSource ID="odsDDL" runat="server" SelectMethod="GetDDL" TypeName="CreateTech.Retail.Web.CommonClass">
                    </asp:ObjectDataSource>后台得到一个集合方法
    /// <summary>
            /// 基礎資料
            /// </summary>
            /// <returns></returns>
            public Dictionary<int, string> GetDDL()
            {
                return ConstValue.DICTBASEDATATYPE;
            }
      

  2.   

    e.Cancel = true;应该就可以关闭了啊.我以前也这样做的
      

  3.   

    解决了
    e.Cancel = true;
    Grid.CancelEdit();