예제 #1
0
        protected override void SetControlStatus()
        {
            var position = this.BindingSourceList.Position;

            this.ButtonMoveUp.Enabled   = BindingSourceList.CanMoveUp(position);
            this.ButtonMoveDown.Enabled = BindingSourceList.CanMoveDown(position);
            this.ButtonDelete.Enabled   = (position >= 0 && position < BindingSourceList.Count);
            this.ButtonAdd.Enabled      = base.EditValue.IsNotNull();
            base.SetControlStatus();
        }
예제 #2
0
        private void ButtonDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var position = this.BindingSourceList.Position;

            if ((position >= 0 && position < BindingSourceList.Count))
            {
                BindingSourceList.RemoveAt(position);
                this.GridControlList.RefreshDataSource();
                SetControlStatus();
                ModifyData();
            }
        }