Home
Manage Your Code
Snippet: Get a value from a row and cell in a DataGridview (C#)
Title: Get a value from a row and cell in a DataGridview Language: C#
Description: this snippet of code allows you to get a specific cell value in a DataGridView by clicking on the cell Views: 666
Author: Richard Mueller Date Added: 10/15/2007
Copy Code  
1private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) {
2   MessageBox.Show("value = " + dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
3}
4