private void DtGridView_BeginningEdit(object sender, DataGridBeginningEditEventArgs e) { frmEditUser edit = new frmEditUser(); //edit.user = obj edit.ShowDialog(); }
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; }