Add columns in datagridview with UserControl?

isawa

Active member
Joined
Oct 3, 2005
Messages
25
Programming Experience
Beginner
How can i created my property add columns in datagridview with my UserControl? Like a That code:


<System.ComponentModel.Description("The items of the Combobox in this User Control"), System.ComponentModel.Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design", GetType(Drawing.Design.UITypeEditor)), System.ComponentModel.DesignerSerializationVisibility(DesignerSerializationVisibility.Content), System.ComponentModel.Category("Misc")> Public ReadOnly Property Items() As ComboBox.ObjectCollection
Get
Return Me.ToolStripComboBox_Fields.Items
End Get
End Property

--- OR ---

Public Property BY_FieldToSearch() As String()
Get
Dim result(Me.ToolStripComboBoxField4Search.Items.Count - 1) As String
Me.ToolStripComboBoxField4Search.Items.CopyTo(result, 0)
Return result
End Get
Set(ByVal value As String())
Me.ToolStripComboBoxField4Search.Items.Clear()
Me.ToolStripComboBoxField4Search.Items.AddRange(value)
End Set
End Property
 
Back
Top