DataGridView: How to select a row or cell?
there is no select(iRow) like DataGrid to highlight a row?
Thanks
there is no select(iRow) like DataGrid to highlight a row?
Thanks
myDataGridView.CurrentCell = myDataGridView[0, rowNum]; myDataGridView.Rows[rowNum].Selected = true; |
Note: You can have the current cell not be in a selected row, so if you want to select a row and locate the curernt cell in it, you need both lines of code.