Can't see Methods/Functions/Events in Inherited UserControl

D

DraguVaso

Hi,

I have a UserControl (MyUserControl) which has a DataGrid (MyDataGrid).
I made a new UserControl that Inherits of my first UserControl: I named it
MyInheritedUserControl.

For some reason I don't 'see' the Methods/Events etc of the Controls I
putted on MyUserControl in the two ComboBoxes on top of the Code Window in
Visual Studio. I can use the Methods and Events, but I have to type them
mysels. For example I can trap the event MyDataGrid_Click, but I have to
type it myself in the MyInheritedUserControl.

Is this normal behaviour? Or should I change something about the Modifiers
of my DataGrid or UserControl? OR how can I be able to see all the possible
events lsited in my MyInheritedUserControl jsut liek I see them in
MyUsercontrol?

Thanks a lot in advance!

Pieter
 
D

Dincer Ozturan

Hi Peter,

I think you are developing your application by using VB.NET. In VB.NET
you can not access the events and methods of an object which has been
declared in the base class from the regular interfaces like the
dropdownlists located over the Code Window, even the object has a
"Protected" modifier. In C#, in the "Properties Window", there is an
"Events" section. It is possible to access the objects'(declared in
the base class) events. By doubleclicking them, VS.NET (for C#)
creates an event handler in the child class.

As long as you use VB.NET you will go on writing it manually, or you
can create the event handler in base class and then cut and paste into
the child class code...

Good Luck,
Dincer
 

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