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

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

            editForm.ShowDialog();
            e00DMTKTableAdapter.Update(eWONDATASET.E00DMTK);
            e00DMTKTableAdapter.Fill(eWONDATASET.E00DMTK);
            gridView1.FocusedRowHandle = tempfocus;
        }