0
Reply

datagridview button text change

nishant ranjan

nishant ranjan

May 2 2013 7:57 AM
2.4k
i have a datagridview in which last column contains button with text "Start"

what i want is when i click on "Start" button than only that row,cell button text should change to "Stop" while other remains to "Start"

i trie below code but not able to do it


dataGridView1.Rows[e.RowIndex].Cells[1].Value = "Stop";
 this.dataGridView1.UpdateCellValue(1, e.RowIndex);


where 1 is the columnindex, i even tried with e.columnindex but not working