Hide control properties

  • Thread starter Thread starter Steve Barnett
  • Start date Start date
S

Steve Barnett

I've got a calendar control that extends the DataGrid View:

public class Calendar : DataGridView

This gives me all the functionality I need for my calendar without the
hassles of writing the grid capabilities from scratch. However, it also
gives the users of my control all the functionality of the DataGridView as
well and that's proving very confusing to them.

What I'd like to do is expose my properties and methods while hiding those
of the DataGridView. Is this possible?

Thanks
Steve
 
Steve,

Not really, not if you extend the class. The best you could do is
create your calendar class, and hold an internal reference to the grid,
exposing the properties/methods you wish.
 
I was afraid of that.

Thanks
Steve


Nicholas Paldino said:
Steve,

Not really, not if you extend the class. The best you could do is
create your calendar class, and hold an internal reference to the grid,
exposing the properties/methods you wish.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Steve Barnett said:
I've got a calendar control that extends the DataGrid View:

public class Calendar : DataGridView

This gives me all the functionality I need for my calendar without the
hassles of writing the grid capabilities from scratch. However, it also
gives the users of my control all the functionality of the DataGridView
as well and that's proving very confusing to them.

What I'd like to do is expose my properties and methods while hiding
those of the DataGridView. Is this possible?

Thanks
Steve
 
Back
Top