i'm building a windows application with c# .net
i have a search window where i make a sql and set the result in to a datagrid
i want to add a button column to this datagrid so when the button is pressed
a label in the same form will display the value of the cell in the first column of selected row
eg.
| Col1 | Col2 | Col3 | BtnCol |
| 10 | asdas | sdasd | button1 |
| 20 | asdas | sdasd | button2 |
| 30 | asdas | sdasd | button3 |
| 40 | asdas | sdasd | button4 |
| 50 | asdas | sdasd | button5 |
if i clicked the button3 the label should display the value 30
can this be done?
if so how?
Thank you
chathura bamunusinghe
i have a search window where i make a sql and set the result in to a datagrid
i want to add a button column to this datagrid so when the button is pressed
a label in the same form will display the value of the cell in the first column of selected row
eg.
| Col1 | Col2 | Col3 | BtnCol |
| 10 | asdas | sdasd | button1 |
| 20 | asdas | sdasd | button2 |
| 30 | asdas | sdasd | button3 |
| 40 | asdas | sdasd | button4 |
| 50 | asdas | sdasd | button5 |
if i clicked the button3 the label should display the value 30
can this be done?
if so how?
Thank you
chathura bamunusinghe
Comment