Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


collection editors with user controls

Posted on 2004-04-22
Medium Priority
Last Modified: 2012-05-04
Hey I have created a collection that inherits from the CollectionsBase that take a columnheader as it's input. I have then created an intance of the collections class and provided a property to it through my usercontrol. The property uses the collections editor attribute to expose the collections editor at design time when I'm using my user control. When I click on the collections property through the desgner the editor pops up but it only displays a Systems.Object property and not all the properties of a column header. This is all pretty complex I know and if I have come this far I should be able to continue. I can but I just want to take the pain out of it if someone know the answer.

here is the code for the collection

public class ColumnCollection : System.Collections.CollectionBase

                  public ColumnCollection()
                  public void Add(ColumnHeader column)
                  public void Remove(int index)
                        // Check to see if there is a widget at the supplied index.
                        if (index > Count - 1 || index < 0)
                              // If no widget exists, a messagebox is shown and the operation
                              // is cancelled.
                              System.Windows.Forms.MessageBox.Show("Index not valid!");
                  public ColumnHeader Item(int Index)
                        // The appropriate item is retrieved from the List object and
                        // explicitly cast to the Widget type, then returned to the
                        // caller.
                        return (ColumnHeader) List[Index];


here is the code for the property in the user control

            , EditorAttribute("typeof(CollectionEditor)","typeof(System.Drawing.Design.UITypeEditor)")]
            public ColumnCollection ColumnsCollection
                        return columnscollection;
                        columnscollection = value;

Thanks in advance and sorry about the low points. It's all a have left.


Question by:simion_tishler
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 23

Expert Comment

ID: 10896010

Author Comment

ID: 10914896
hey rama

that didn't help. Have you actually used the collection editor before? The article was concerning runtime environments.

Accepted Solution

modulo earned 0 total points
ID: 10966874
Closed, 80 points refunded.

Community Support Moderator
Experts Exchange

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question