Ana içeriğe atla

Kayıtlar

DataGrid de seçilen bilgillerin textlere aktarılması etiketine sahip yayınlar gösteriliyor

DataGrid de seçilen bilgillerin textlere aktarılması

  Dikkat : Burada DataGrid özelliği CellContentClick olmalı. private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) {     // Tıklanan satırın index numarasını kontrol et     if (e.RowIndex >= 0)     {         DataGridViewRow row = dataGridView1.Rows[e.RowIndex];         // TextBox'lara hücredeki verileri atıyoruz         txt_Plaka.Text = row.Cells["plaka"].Value.ToString();         txt_Marka.Text = row.Cells["marka"].Value.ToString();         txt_Model.Text = row.Cells["model"].Value.ToString();         txt_Yil.Text = row.Cells["yil"].Value.ToString();         txt_AdiSoyadi.Text = row.Cells["adi_soyadi"].Value.ToString();         txt_Telefon.Text = row.Cells["telefon"].Value.ToString();     } }