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.
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.