In C# to access an element of Array or Indexed property, [ ] brackets are to be used. So set the
Selected
property as follows
dataGridView1.Rows[e.RowIndex].Selected = true;
The ( ) parentheses are used to invoke a method. Since,
Rows
is a collection the above error is thrown, as it is not a method to be invoked with ( ) parentheses.