S
s.lustre
after adding controls to a panel on my form, i need to delete them. does
anybody know how to programatically delete controls?
'my add function works
For i = 0 To DirectCast(dgRoutingTable.DataSource, DataView).Count()
Dim u As New RoutingControl.RoutingControl
With u
..Comments = i.ToString
..Location = New System.Drawing.Point(0, 136 * (i - 1))
End With
Me.Panel1.Controls.Add(u)
Next i
'my delete function doesnt work
For i = 0 To DirectCast(dgRoutingTable.DataSource, DataView).Count()
Dim u As RoutingControl.RoutingControl
Me.Panel1.Controls.Remove(u)
Next i
anybody know how to programatically delete controls?
'my add function works
For i = 0 To DirectCast(dgRoutingTable.DataSource, DataView).Count()
Dim u As New RoutingControl.RoutingControl
With u
..Comments = i.ToString
..Location = New System.Drawing.Point(0, 136 * (i - 1))
End With
Me.Panel1.Controls.Add(u)
Next i
'my delete function doesnt work
For i = 0 To DirectCast(dgRoutingTable.DataSource, DataView).Count()
Dim u As RoutingControl.RoutingControl
Me.Panel1.Controls.Remove(u)
Next i