Hi..
am trying to add items in the combobox during runtime..
The Combobox is placed inside the propertygrid..
The below code is how i made the combobox..
now i want to add/edit the combobox items..Code:Public Class Employee Private m_name As String <TypeConverter(GetType(Properties)), CategoryAttribute("Gender"), DefaultValueAttribute("Male")> _ Public Property Gender() As String Get Return m_name End Get Set(ByVal Value As String) m_name = Value End Set End Property 'Here the properties class Imports System.ComponentModel Public Class Properties : Inherits System.ComponentModel.StringConverter Dim Names() As String = New String() {"Welder", "HorsePower"} Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection Return New StandardValuesCollection(Names) End Function Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean Return True End Function ''' Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean Return True End Function End Class ' in the form load.. PropertyGrid1.SelectedObject = New Employee
is it possible..





Reply With Quote