예제 #1
0
        private void LoadDataToGrid()
        {
            MainGrdBind.Binding(this.MainBF.EtyList);

            //if (MainGrdBind.Count == 0)
            //    MainGrd_SelectionChanged(null, null);

            if (MainDataIsGroup)
            {
                MainGrdBind.PositionTo(LastGrp as BaseEntity);
                if (AttachGrdBind.DataSource != null)  //MainGrd无数据时AttachGrd Bind在null上,不可PositionTo
                {
                    AttachGrdBind.PositionTo(LastMbr as BaseEntity);
                }
            }
            else
            {
                MainGrdBind.PositionTo(LastMbr as BaseEntity);
                if (AttachGrdBind.DataSource != null)  //MainGrd无数据时AttachGrd Bind在null上,不可PositionTo
                {
                    AttachGrdBind.PositionTo(LastGrp as BaseEntity);
                }
            }

            EditState = eDataEditState.esBrowse;
        }
        private void GrpSelectFmSingle_Load(object sender, EventArgs e)
        {
            Grid.MouseDoubleClick += this.Grid_MouseDoubleClick;

            this.Text = "Ñ¡Ôñ <" + GrpSlt.Kind + ">";
            this.Bind = new GridViewBind <BaseEntity>(this.Grid,
                                                      columnMng: new GridBindColumnMngImpl_Appoint(
                                                          new GridBindColumnAndPropertyMap("Name", new GridBindColumnAttribute {
                Title = "Ãû³Æ"
            })));

            Bind.Binding(GrpSlt.List);
            Bind.PositionTo(selectEty);
            new FormMemoryImpl(this, VC2WinFmApp.Cfg, "FormRem");  //´°Ìå¼ÇÒä
        }
 private void MbrSelectFmSingle_Shown(object sender, EventArgs e)
 {
     MbrBind.PositionTo(this.SelectEty);
 }