private void ContactGrid_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e) { if (ContactGrid.SelectedRows.Count == 1) { int index = e.Row.Index; txtContactId.Text = ContactGrid.Rows[index].Cells[0].Value.ToString(); txtContactName.Text = ContactGrid.Rows[index].Cells[1].Value.ToString(); txtContactFamily.Text = ContactGrid.Rows[index].Cells[2].Value.ToString(); txtContactAddress.Text = ContactGrid.Rows[index].Cells[3].Value.ToString(); txtContactPhoneNumber.Text = ContactGrid.Rows[index].Cells[4].Value.ToString(); txtContactBirthDate.Text = ContactGrid.Rows[index].Cells[5].Value.ToString(); txtContactEmailAddress.Text = ContactGrid.Rows[index].Cells[6].Value.ToString(); txtContactFasebookAddress.Text = ContactGrid.Rows[index].Cells[7].Value.ToString(); }
ContactGrid.Rows[index].Cells[3].ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)