DataGridColumn Collection Editor

J

Jimmy Seow

Hi,
Hope somebody can help me with the following.
I'm trying to create a Webcontrol using composition. I've created a class and inherited from Webcontrol and created a button control and a datagrid control.
One of the properties of my control is Columns which I delegated to the Datagrid.Columns property. This is defined as follows.
<Category("Misc"), DesignerSerializationVisibility(DesignerSerializationVisibility.Content),NotifyParentProperty(True), PersistenceMode(PersistenceMode.InnerProperty), Editor(GetType(System.ComponentModel.Design.CollectionEditor), GetType(System.Drawing.Design.UITypeEditor))> _

Public ReadOnly Property Columns() As DataGridColumnCollection
Get
EnsureChildControls()
Return _dgGrid.Columns
End Get
End Property

When I tested the control and dropped it into a webpage in design mode, I can see the Columns property in the properties designer. I am able to click on the button associated with the columns property and bring up the DatagridColumn Collection Editor. The problem is that the Add and Remove buttons are both disabled. How can I enable these buttons?

Thanks very much for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top