DevExpress
2013.07.12 09:54
xtraGrid에서 선택된 아이템 가져오는 방법
다물칸 주소복사
조회 수 2013 추천 수 0 댓글 0
구분 | 팁&트릭 |
---|---|
출처 | http://stackoverflow.com/questions/12762617/how-to-get-the-selected-row-values-of-devexpress-xtragrid |
textBox1.Text = gridView1.GetDataRow(e.FocusedRowHandle)["Name"].ToString();
textBox1.Text = gridView1.GetFocusedDataRow()["Name"].ToString();
textBox1.Text = (gridView1.GetFocusedRow() as DataRowView).Row["Name"].ToString();
textBox1.Text = gridView1.GetFocusedRowCellValue("Name").ToString();
void dataGridView1_CellClick_1(object sender, DataGridViewCellEventArgs e)
{
TBGRNo.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
TBSName.Text = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
TBFName.Text = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
}