title: How to Add Row at Last position and Remove Row from current position In DataGridview in VB.net
body: <p>I am working on vb./net.
   in grid view Every have two button Like + and - if user Click + Then One row need to add at last position and if user click - then one row need to remove from Current position</p>
  
  <p>I have try following code but it will give me an error</p>
  
  <pre><code>Private count As Integer = 1
      Private Sub dgvSourcePath_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSourcePath.CellContentClick
          If e.ColumnIndex = 2 Then
              dgvSourcePath.Rows.Insert(count)
          End If
          If e.ColumnIndex = 3 Then
              count -= 1
              dgvSourcePath.Rows.RemoveAt(count)
          End If
          If e.ColumnIndex = 1 Then
              OpenSourceFileDialog.ShowDialog()
              If Windows.Forms.DialogResult.OK Then
                  dgvSourcePath.CurrentRow.Cells(0).Value = OpenSourceFileDialog.FileName
              End If
          End If
          dgvSourcePath.Refresh()
      End Sub
  </code></pre>