I have a datagridview which is filled with data from db and i need to do this: when click on a row in datagrid all the fields with data from this row will be in other textboxes or something else. How to do so? Thanks in advance.
+1
A:
On your CellClick event, do int rowIndex = e.RowIndex. From there you can do DataGridViewRow row = DataGridView1.Rows[rowIndex] and access all the cells in row (or better yet, from your underlying DataTable).
Dan Tao
2009-09-23 11:43:04
thank you very much, it helped me a lot!
2009-09-25 11:29:10