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?
 
e1vCommented:
you can do it like this

this.myDataGridview.CurrentCell = this.assingmentListDataGridView[8, myDataGridview.CurrentCell.RowIndex];
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.