Пример #1
0
        private void addBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.AddNewRow();
            AddEditDMVT editForm = new AddEditDMVT(gridView1, true); // 2nd argument is true for Adding

            editForm.ShowDialog();
            e00DMVTTableAdapter.Update(eWONDATASET.E00DMVT);
            e00DMVTTableAdapter.Fill(eWONDATASET.E00DMVT);
            gridView1.FocusedRowHandle = gridView1.DataRowCount - 1;
        }
Пример #2
0
        private void editBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int         tempfocus = gridView1.FocusedRowHandle;
            AddEditDMVT editForm  = new AddEditDMVT(gridView1, false); // 2nd argument is false for editting

            editForm.ShowDialog();
            e00DMVTTableAdapter.Update(eWONDATASET.E00DMVT);
            e00DMVTTableAdapter.Fill(eWONDATASET.E00DMVT);
            gridView1.FocusedRowHandle = tempfocus;
        }