Пример #1
0
        private void btnNew_ItemClick(object sender, ItemClickEventArgs e)
        {
            EditOrderForm form = new EditOrderForm();

            form.MdiParent   = this.MdiParent;
            form.WindowState = FormWindowState.Maximized;
            form.Show();
            form.FormClosing += EditForm_FormClosing;
        }
Пример #2
0
        private void btnEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            EditOrderForm form = new EditOrderForm();

            form.OrderId     = (int)OrdersView.GetFocusedRowCellValue("Oid");
            form.WindowState = FormWindowState.Maximized;
            form.MdiParent   = this.MdiParent;
            form.Show();
            form.FormClosing += EditForm_FormClosing;
        }
Пример #3
0
        private void EditForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            EditOrderForm form = (EditOrderForm)sender;

            Reload();
            int rowHandle = OrdersView.LocateByValue("Oid", form.OrderId, new OperationCompleted(rh => SetFocusedRow((int)rh)));

            if (rowHandle != GridControl.InvalidRowHandle)
            {
                SetFocusedRow(rowHandle);
            }
        }