.NETGURU
Custom Server Control / Collection Property
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Russ Nemhauser
Greetings,

I am creating a custom user control in a new Web Control Library project. My
control exposes one public readonly property called "Groups" which returns a
Collection.

This is really cool because when the user puts my control into his web form
in design time, he can see the "Groups" property in the properties window
and that little button with the three dots on it. When he clicks that it
brings up this really cool collection manager that lets you add items and
move them around & stuff.

The problem is, it is only letting him add "System.Object"s to this thing.
How can I get it to add the class that I created in my control so he can put
all the properties & stuff he needs in there? System.Object doesn't do me
any good!

Thanks in advance,
Russ

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

Reply to this message...
 
    
Scott Guthrie (VIP)
You might want to take a look at the PerformanceMonitor control at:

http://www.asp.net/ControlGallery/ControlDetail.aspx?Control=3D43&tabinde=
x
=3D2

The source is shipped with the control -- and shows how to do something
very similar with a typed PerformanceCounterCollection (although the
control is written in C#).

Hope this helps,

Scott

-----Original Message-----
From: Russ Nemhauser [mailto:Click here to reveal e-mail address]=20
Sent: Saturday, April 06, 2002 5:42 PM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] Custom Server Control / Collection Property

Greetings,

I am creating a custom user control in a new Web Control Library
project. My=20
control exposes one public readonly property called "Groups" which
returns a=20
Collection.

This is really cool because when the user puts my control into his web
form=20
in design time, he can see the "Groups" property in the properties
window=20
and that little button with the three dots on it. When he clicks that it

brings up this really cool collection manager that lets you add items
and=20
move them around & stuff.

The problem is, it is only letting him add "System.Object"s to this
thing.=20
How can I get it to add the class that I created in my control so he can
put=20
all the properties & stuff he needs in there? System.Object doesn't do
me=20
any good!

Thanks in advance,
Russ

_________________________________________________________________
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT=20
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
Alex Lowe
Of course you can always take the C# source and then run it through the
translator over at
(http://aspalliance.com/aldotnet/examples/translate.aspx). =)

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Have a question about using client side coding in your ASP.NET pages?
Send your question to [aspngclient]
(http://www.aspfriends.com/aspfriends/aspngclient.asp)
***********************************************************

[Original message clipped]

Reply to this message...
 
    
Russ Nemhauser
I think this is pointing me in the right direction, but in VB there appears
to be no such thing as "CollectionEditor" in the
System.ComponentModel.Design namespace. Can anyone shed some light?

Thanks,
Russ

[Original message clipped]

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Reply to this message...
 
 
System.ComponentModel.Design.CollectionEditor
System.Object




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification