/// <summary> /// /// </summary> /// <param name="synchronizationRoot"></param> /// <returns></returns> protected override DetailGrid CreateInstance(DetailGrid synchronizationRoot) { ArchiveUnboundDetailGrid grid = new ArchiveUnboundDetailGrid(this, synchronizationRoot); grid.ControlManager = this.ControlManager.Clone() as IControlManager; grid.SetGridPermissions(); //grid.DisplayManager = this.DisplayManager.Clone() as IDisplayManager; grid.GridName = this.GridName; grid.ControlManager.DisplayManager.BindingControls.Clear(); grid.ControlManager.DisplayManager.BindingControls.Add(grid); // 如果用new CancelEventHandler(row_Saving)则相当于this.row_Saving,在事件处理程序中用this指的是Template grid.ArchiveGridHelper.RowSaving += new System.ComponentModel.CancelEventHandler(grid.row_Saving); grid.ControlManager.ListChanged += new ListChangedEventHandler(grid.m_cm_ListChanged); return grid; }