![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would like to capture the value in a specific cell in the current row on a double-click event on a DataGridView. I can't seem to figure out the syntax. Any help is greatly appreciated. |
#3
| |||
| |||
|
|
See this article.. it should give you some ideas.. http://www.netomatix.com/development...ideaccess.aspx "Greg Smith" <gjs (AT) umn (DOT) edu> wrote in message news:uSnOs%23FoGHA.4800 (AT) TK2MSFTNGP04 (DOT) phx.gbl... I would like to capture the value in a specific cell in the current row on a double-click event on a DataGridView. I can't seem to figure out the syntax. Any help is greatly appreciated. |
#4
| |||
| |||
|
|
Well Winista referanced an article that is a java code and it didnt give any idea to me Here is simple way to do that, This is my first programming attempt. if this a stupid way to do this please inform me. // adresses to selected row's sixth cell string ProdID =dataGridView1.SelectedRows[0].Cells[5].EditedFormattedValue.ToString(); // adresses to selected row's first cell string ProdCode = dataGridView1.SelectedRows[0].Cells[0].EditedFormattedValue.ToString(); MessageBox.Show("Product ID " + ProdID + " Product Code " + ProdCode) Put this code under private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) and it will work Winista yazdi: See this article.. it should give you some ideas.. http://www.netomatix.com/development...ideaccess.aspx "Greg Smith" <gjs (AT) umn (DOT) edu> wrote in message news:uSnOs%23FoGHA.4800 (AT) TK2MSFTNGP04 (DOT) phx.gbl... I would like to capture the value in a specific cell in the current row on a double-click event on a DataGridView. I can't seem to figure out the syntax. Any help is greatly appreciated. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |