1-) C# - sql datagridden verileri çekme
int secilen = dataGridView1.SelectedCells[0].RowIndex;
Txtİd.Text = dataGridView1.Rows[secilen].Cells[0].Value.ToString();
//Txtİd.Text = dataGridView1.Rows[secilen]["yazar"];
TxtAd.Text = dataGridView1.Rows[secilen].Cells[1].Value.ToString();
TxtSoyad.Text = dataGridView1.Rows[secilen].Cells[2].Value.ToString();
CmbSehir.Text = dataGridView1.Rows[secilen].Cells[3].Value.ToString();
Mskmaas.Text = dataGridView1.Rows[secilen].Cells[4].Value.ToString();
string dd = dataGridView1.Rows[secilen].Cells[5].Value.ToString();
if (dd!="")
{
Boolean deger = Convert.ToBoolean(dd);
if (deger == true)
{
radioButton1.Checked = true;
}
else
{
radioButton2.Checked = true;
}
}
else
{
radioButton1.Checked = true;
}
TxtMeslek.Text = dataGridView1.Rows[secilen].Cells[6].Value.ToString();