Delete the same row in different gridviews (VB.NET)

  • Thread starter Thread starter Larkinos
  • Start date Start date
L

Larkinos

Guest
If I have two gridviews that are mirror, that is, they are identical, how can I delete the same row in both GridViews ?, that is, if you delete the row 7 in Gridview1, row 7 is deleted in GridView2 too.

I made this code.


Dim UnitIndex As Integer()

Dim selectedRows() As Integer = GridView1.GetSelectedRows()

For Each rowHandle As Integer In selectedRows
If rowHandle >= 0 Then
UnitIndex = GridView1.GetSelectedRows
End If
Next rowHandle

Dim p As Integer = UnitIndex
GridView2.DeleteRow(p)

Please, could you guide me to do this?

Thanks you in advance.

Continue reading...
 
Back
Top