By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,989 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,989 IT Pros & Developers. It's quick & easy.

Inherits Collection

P: n/a
Hi all :
Can I
Inherits GridColumnStylesCollection
if yes, and how to write it ?

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"Michael"

Class MyGridColumnStylesCollection
Inherits GridColumnStylesCollection

End Class

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
But it show error while

it say :
Class MyGridColumnStylesCollection must declare a 'Sub New' because its base
class 'GridColumnStylesCollection' does not have an accessible 'Sub New'
that can be called with no arguments.

how to fix it ?

Thanks

"Cor Ligthert [MVP]" <no************@planet.nl> 撰寫於郵件新聞:Oa*************@TK2MSFTNGP15.phx.gb l...

"Michael"

Class MyGridColumnStylesCollection
Inherits GridColumnStylesCollection

End Class

I hope this helps,

Cor

Nov 21 '05 #3

P: n/a
Michael,

Maybe can I better ask what is your goal with this,

There is a lot described how to reuse a lot of the datagrid while the
datagridview from Net 2.0 has a lot standard.

http://msdn.microsoft.com/library/de...stDataGrid.asp

(there is much more)

http://msdn.microsoft.com/library/de...tml/vs05a9.asp

I hope this helps,

Cor
Nov 21 '05 #4

P: n/a
Actually :

I want to create the user control as follow :
Public Class LookAndView
Inherits System.Windows.Forms.UserControl
Private _Collection As GridTableStylesCollection
Public Property Styles() As
System.Windows.Forms.GridTableStylesCollection
Get
Return _Collection
End Get
Set(ByVal Value As System.Windows.Forms.GridTableStylesCollection)
_Collection = Value
End Set
End Property
emd class

I want the properties Styles can edit in style collection editor during in
design mode. However, I find there some problem :
1. Styles property show empty / nothing (I know the normal case is show
collection)
2. When I click new in style collection editor and input some value into
properites. And then I click ok. During open the style collection editor.
the member side still nothing.
Can u help me to solve this problem ?

Thanks

"Cor Ligthert [MVP]" <no************@planet.nl> 撰寫於郵件新聞:eg*************@TK2MSFTNGP12.phx.gb l...
Michael,

Maybe can I better ask what is your goal with this,

There is a lot described how to reuse a lot of the datagrid while the
datagridview from Net 2.0 has a lot standard.

http://msdn.microsoft.com/library/de...stDataGrid.asp

(there is much more)

http://msdn.microsoft.com/library/de...tml/vs05a9.asp

I hope this helps,

Cor

Nov 21 '05 #5

P: n/a
Michael,
Can u help me to solve this problem ?

No, because apples is not a collection of pears.

(I don't see what the styles has to do with a usercontrol and how you could
use that)

Cor
Nov 21 '05 #6

P: n/a
Ok. Thanks

I try to use another method.
Another question is how to create simple custom collection editor for
usercontrol . any simple sample for me as reference ?

Thanks

"Cor Ligthert [MVP]" <no************@planet.nl> 撰寫於郵件新聞:uI**************@TK2MSFTNGP11.phx.g bl...
Michael,
Can u help me to solve this problem ?

No, because apples is not a collection of pears.

(I don't see what the styles has to do with a usercontrol and how you
could use that)

Cor

Nov 21 '05 #7

P: n/a
"Michael" <la********@gmail.com> schrieb:
But it show error while

it say :
Class MyGridColumnStylesCollection must declare a 'Sub New' because its
base class 'GridColumnStylesCollection' does not have an accessible 'Sub
New' that can be called with no arguments.


You cannot inherit from this class because its base class doesn't have a
constructur which is accessible from the derived class.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.