DataGridView: How to select a row or cell?

there is no select(iRow) like DataGrid to highlight a row?

Thanks

[75 byte] By [Handi] at [2007-12-16]
# 1


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.

durstin at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...