DataGridColumn Collection Editor

Discussion in 'ASP .Net Web Controls' started by Jimmy Seow, Dec 2, 2003.

  1. Jimmy Seow

    Jimmy Seow Guest

    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.
    Jimmy Seow, Dec 2, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Walker
    Replies:
    2
    Views:
    2,387
    Jay Walker
    Feb 8, 2004
  2. Stylus Studio
    Replies:
    0
    Views:
    621
    Stylus Studio
    Aug 3, 2004
  3. Øyvind Isaksen
    Replies:
    1
    Views:
    929
    Øyvind Isaksen
    May 18, 2007
  4. Giorgio Parmeggiani

    DataGridColumn design editor

    Giorgio Parmeggiani, Oct 27, 2003, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    130
  5. Replies:
    1
    Views:
    272
    Tim Dot NoSpam
    May 19, 2006
Loading...

Share This Page