Hi,
i'm a .net programmer, using .net framework 4, and i have a question about WithEvents clause.
i created my base class
and a custom bindinglist class with some methods inside
i declared a global variable
but when i try to access to addingnew events of the bindinglist(of t) class
i get this error:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
I think the problem is my custom bindinglist class....but how can i solve this?
many thanks!!!
Acquistapace Yuri
i'm a .net programmer, using .net framework 4, and i have a question about WithEvents clause.
i created my base class
VB.NET:
public class clsbaseclass
public property p1 as string
public property p2 as string
end class
and a custom bindinglist class with some methods inside
VB.NET:
public class lstBaseClass
inherits BindingList(of clsBaseClass)
...sub fill()
.. and other methods
end class
i declared a global variable
VB.NET:
public withevents mylist as new lstBaseClass
but when i try to access to addingnew events of the bindinglist(of t) class
VB.NET:
Private Sub mylist_AddingNew(ByVal sender As Object, ByVal e As AddingNewEventArgs) Handles mylist.AddingNew
i get this error:
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
I think the problem is my custom bindinglist class....but how can i solve this?
many thanks!!!
Acquistapace Yuri
Last edited: