CurrentRowIndex DataGridview

Instead of having my rowIndex be "2", how do i set it  do be the current row?

this.myDataGridview.CurrentCell = this.assingmentListDataGridView[8, 2];

would like something like

this.myDataGridview.CurrentCell = this.assingmentListDataGridView[8, myDataGridview.CurrentRow];

this.assingmentListDataGridView.CurrentCell.Value = "pizza is great";
LVL 3
JasonWinnAsked:
Who is Participating?
 
e1vConnect With a Mentor Commented:
you can do it like this

this.myDataGridview.CurrentCell = this.assingmentListDataGridView[8, myDataGridview.CurrentCell.RowIndex];
0
All Courses

From novice to tech pro — start learning today.