C#

dataGridView에 DB Select만 불러오기

갱생쌩유 2012. 7. 9. 09:05

DataGridViewRow mydgv = new DataGridViewRow();
DataGridViewTextBoxCell cell1 = new DataGridViewTextBoxCell();
cell1.Value = sdr[0];
mydgv.Cells.Add(cell1);
DataGridViewTextBoxCell cell2 = new DataGridViewTextBoxCell();
cell2.Value = sdr[1];
mydgv.Cells.Add(cell2);
dataGridView1.Rows.Add(mydgv);