Ejemplo n.º 1
0
 private void ShowEditForm()
 {
     if (gridViewTop.GetFocusedRow() is TopBl selected)
     {
         var form = new EditTopForm(_repo, selected);
         form.ShowDialog();
         form.Dispose();
     }
 }
Ejemplo n.º 2
0
        private void barButtonItemAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var form = new EditTopForm(_repo);

            if (form.ShowDialog() == DialogResult.OK)
            {
                RefreshGrid();
                form.Dispose();
                gridViewTop.FocusedRowHandle = _items.Count - 1;
            }
        }