Home All Groups Group Topic Archive Search About

.Net 2.0 Web UserControl EditorAttribute Problem

Author
20 Jun 2006 11:40 PM
HawkEye
Hi.

I'm trying to expose the DropDownList ListItemCollection property at design
time on a Web user control, using the following code.


        <Category("Apearance"), Browsable(True), _

EditorAttribute(GetType(System.Web.UI.Design.WebControls.ListItemsCollectionEditor), _
        GetType(UITypeEditor))> _
        Public ReadOnly Property ListItems() As ListItemCollection
            Get
                Return Me.ddlControl1.Items
            End Get
        End Property

The problem is that the ListItems property is being displayed in
properties; but the editor button is not displaying. As far as i can see this
is virtualy identical to the example on MSDN.

i'm using the following assemblies -

Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Drawing.Design
Imports System.Web.UI.Design.WebControls

Please can anybody help.

Thanks
Ben