WHEN I RUN AND CLICK ON IN ONE ROW THEN THERE IS AND ERROR ON IT HO TO SOLVE THIS AND ERROR IN EMAIL
private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
guest_id.Text = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
first_name.Text = dataGridView1.SelectedRows[0].Cells[1].Value.ToString();
last_name.Text = dataGridView1.SelectedRows[0].Cells[2].Value.ToString();
txt_gender_status.Text = dataGridView1.SelectedRows[0].Cells[3].Value.ToString();
txt_martial_status.Text = dataGridView1.SelectedRows[0].Cells[4].Value.ToString();
phone_numb.Text = dataGridView1.SelectedRows[0].Cells[5].Value.ToString();
email_id.Text = dataGridView1.SelectedRows[0].Cells[6].Value.ToString();
}
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index