为datagridviewcolumncollection创建一个新属性 [英] create a new property for datagridviewcolumncollection

查看:89
本文介绍了为datagridviewcolumncollection创建一个新属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想为datagridviewcolumncollection
创建一个新属性 我创建了一个继承datagridviewcolumncollection
的类

Hai

I want to create a new property for datagridviewcolumncollection
I created a class which inherits datagridviewcolumncollection

Public Class NewDataCol Inherits datagridviewcolumncollection



并在此处添加了一些新属性.
之后,创建了一个继承Datagridview
的新类



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

Public class IGrid inherits Datagridview



我在这里使用此代码.



Here I use this code.

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


当我将Igrid添加到表单时,看不到任何新属性.
请告诉我怎么做.

谢谢


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

Thanks

推荐答案

^ ]-在这里您需要开始.最后一个实验(实验编号7)是关于继承和覆盖的.第二个是: Visual Basic中的面向对象编程 [ ^ ].仔细阅读.
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.


这篇关于为datagridviewcolumncollection创建一个新属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆