Exemple #1
0
        private void addBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.AddNewRow();
            AddEditDMKHO editForm = new AddEditDMKHO(gridView1, true); // 2nd argument is true for Adding

            editForm.ShowDialog();
            e00DMKHOTableAdapter.Update(eWONDATASET.E00DMKHO);
            e00DMKHOTableAdapter.Fill(eWONDATASET.E00DMKHO);
            gridView1.FocusedRowHandle = gridView1.DataRowCount - 1;
        }
Exemple #2
0
        private void editBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int          tempfocus = gridView1.FocusedRowHandle;
            AddEditDMKHO editForm  = new AddEditDMKHO(gridView1, false); // 2nd argument is false for editting

            editForm.ShowDialog();
            e00DMKHOTableAdapter.Update(eWONDATASET.E00DMKHO);
            e00DMKHOTableAdapter.Fill(eWONDATASET.E00DMKHO);
            gridView1.FocusedRowHandle = tempfocus;
        }