0

i have a 1 datagridview in form1 and 1 listview in form2. the records in the datagridview are from my ms access also in my listview the records (items/subitems) are also in from the ms access. i do some deletion of records in the datagridview using vb.net. My problem is this, how i can delete records in the datagridview and in the listview just in one click at the same time?

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Begginnerdev
0

If you are deleting the row from the gridview/listview AND the database...just refresh the data.

If not, you can try something like the following:

Private iRecord As Integer 'Set this to the datatype of your unique value

Public Property RowToDelete As Integer 'Set this to the datatype of your unique value
    Get
        return Me.iRecord
    End Get
    Set(value as Integer)
        Me.iRecord = value
    End Set
End Property

Now, when you delete the row from a - pass the unique to b - deleting it there as well.

If both are filled with the same exact data in the same order, you can simply use the row number

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.