コード例 #1
0
        private void DtGridView_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
        {
            frmEditUser edit = new frmEditUser();

            //edit.user = obj

            edit.ShowDialog();
        }
コード例 #2
0
        private void DtGridView_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
        {
            var objectToEdit = ((DataGrid)sender).SelectedValue as Usuario;

            frmEditUser edit = new frmEditUser();

            edit.user = objectToEdit;

            edit.ShowDialog();

            ((DataGrid)sender).SelectedValue = edit.user;
        }