AlexCode Posted March 11, 2005 Posted March 11, 2005 Hi... I have a little Design-time collections property grid display question... I have a class that inherits from CollectionBase. This class is part of a UserControl, returned from a Public Property. How do I make it appear on the Property Grid, at design time, so I can edit it's items on the Object Collection Editor? Note1: all the items on this collection have the same type. Note2: I can make it a TypedCollection but then I will loose, for example, the Add & AddRange methods. Thanks. Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Winston Posted March 13, 2005 Posted March 13, 2005 lol believe me this is quite non-trivial to do, it's easy to show it in the property grid it's just a simple attribute, not at home don't have the IDE in front of me, i think it's DesignTimeSerialization? someone will correct me, but that will only enavle you to show it in the property grid, it will probably add the items correctly but the hardest things are using TypeConverters to get the code generators generating code for the item in the collection. Quote
AlexCode Posted March 14, 2005 Author Posted March 14, 2005 Ok... Or there's something deeper than that or that tis just the top of it... That will work only if the collection is typed, in other words, something like a String array, for example. On the other hand, if the collection is an ArrayList, the collection editor doesn't know what type to add... Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.