deleting the rows from datagridview

F

friend

Hi all,
How to delete the binded class objects from the datagridview. ??
I am filling the datagridview with 3 class objects where the objects
get the values from the text boxes.
if I do

Datagridview.rows.removeAT(row.index)

it doesnt work...

my code is :

Public Class DataGridData
Private mName As String
Private mIP_Address As String
Private mPort As String
Public Property Name() As String
Get
Return mName
End Get
Set(ByVal value As String)
mName = value
End Set
End Property
Public Property Address() As String
Get
Return mIP_Address
End Get
Set(ByVal value As String)
mIP_Address = value
End Set
End Property

End Class

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles OK.Click

Dim TmpDGVData As New DataGridData
TmpDGVData.Name = NameOfEntry.Text
TmpDGVData.Address = Addr.Text

Properties.DataGridView1.DataSource = DGVdata (Properties is
another form)
end sub

Private DGVdata As New List(Of DefineLANConn.DataGridData)


after sending , the seleted row in the datagridview should get deleted
by clicking a button..
thanks for any help...
 
C

Cor Ligthert[MVP]

As long as the row is in the Properties of that other form, the row is in
the DataGridView

DGVdata (Properties is another form)

Cor
 
F

friend

As long as the row is in the Properties of that other form, the row is in
the DataGridView

DGVdata (Properties is another form)

Cor














- Show quoted text -

i didnt get you...thanks anyway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top