private void dataGridViewDobavljaci_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { int dobavljacID = Convert.ToInt32(dataGridViewDobavljaci.SelectedRows[0].Cells[0].Value); dobavljac = DBDobavljaci.DobavljaciSelectByID(dobavljacID); this.Close(); } }