Click here to Skip to main content
15,908,834 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hai

I want to create a new property for datagridviewcolumncollection
I created a class which inherits datagridviewcolumncollection
VB
Public Class NewDataCol Inherits datagridviewcolumncollection


and added some New property here.
after that created a new class which inherits Datagridview

VB
Public class IGrid inherits Datagridview


Here I use this code.
VB
Private ColCollection As NewDataCol

  
    Public Overloads Property columns() As NewDataCol
        Get
            Return ColCollection
        End Get
        Set(ByVal value As NewDataCol)
            ColCollection = value
        End Set
    End Property

When i add Igrid to a form I can't see any new property.
Please tell me how to do it.

Thanks
Posted
Updated 12-Dec-11 17:21pm
v2
Comments
[no name] 12-Dec-11 23:21pm    
added "pre" tags and code blocks

1 solution

Introducing the Visual Studio .NET Lab Series[^] - here you need to start. The last lab (lab no. 7) is about Inheritance and Override. The second one is: Object-Oriented Programming in Visual Basic[^]. Read it carefully.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900