DataGridView UserControl help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    #1

    DataGridView UserControl help

    I created a UserControl that has a DataGridView. I want to make
    the .Columns property of the DataGridView available from the
    UserControl when it is placed on a form. Since it's readonly I made
    the property code readonly. See below...

    <Browsable(True ), Description("") _
    Public ReadOnly Property Columns() As
    System.Windows. Forms.DataGridV iewColumnCollec tion
    Get
    Return DataGridView1.C olumns
    End Get
    End Property

    So when I attempt to create the columns in an instance of my
    UserControl on a form it works. However, when I close the form
    Designer and then open it back up, the columns are gone.

    Does anyone have any ideas?

Working...