public Form1()
 {
     InitializeComponent();
     CreateDataSource();
     item = new RepositoryItemMyButtonEdit();
     ConfigureRepositoryItemButtonEdit(item);
 }
 private void ConfigureRepositoryItemButtonEdit(RepositoryItemMyButtonEdit item)
 {
     item.Buttons[0].Kind = ButtonPredefines.OK;
     item.Buttons.Add(new EditorButton());
     item.DrawButton += new DrawButtonEventHandler(myButtonEdit2_DrawButton);
     gridControl1.RepositoryItems.Add(item);
     gridView1.Columns["Age"].ColumnEdit = item;
     gridView1.ShowButtonMode            = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways;
 }
예제 #3
0
        public override void Assign(RepositoryItem item)
        {
            RepositoryItemMyButtonEdit source = item as RepositoryItemMyButtonEdit;

            BeginUpdate();
            try {
                base.Assign(item);
                if (source == null)
                {
                    return;
                }
            }
            finally {
                EndUpdate();
            }
            Events.AddHandler(drawButton, source.Events[drawButton]);
        }
예제 #4
0
 static MyButtonEdit()
 {
     RepositoryItemMyButtonEdit.Register();
 }