property selected and load other items in other properties
-
HI CP , Location : Areas, Countries , Capitals Item List : property selected in Location and load items in Item List I am having 1 property with drop down : Areas, Countries , Capitals suppose if i select the Areas then i have to load dynamically Areas thru the .txt file and if i clicked countries then i have to load dynamically and the same . How can i do this Dynamically ?? while clicking the particular item . Regards,
-
HI CP , Location : Areas, Countries , Capitals Item List : property selected in Location and load items in Item List I am having 1 property with drop down : Areas, Countries , Capitals suppose if i select the Areas then i have to load dynamically Areas thru the .txt file and if i clicked countries then i have to load dynamically and the same . How can i do this Dynamically ?? while clicking the particular item . Regards,
If I'm following you correctly, each combo is dependent off another. I'm assuming you have some kind of a settings class (with related classes for the combo(s)?) that the property grid is set to. You could in the settings class, for each property set statement, parse the text files and update the values for the other properties as needed, which would update the values in the combo(s).
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
If I'm following you correctly, each combo is dependent off another. I'm assuming you have some kind of a settings class (with related classes for the combo(s)?) that the property grid is set to. You could in the settings class, for each property set statement, parse the text files and update the values for the other properties as needed, which would update the values in the combo(s).
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
Hi CP This is my code i am retrieving a property value which raises the error
Public Class cTxtBoxProperties
<Category("Misc")> <Description("Displays the type of data associated with the control")> \_ <TypeConverter(GetType(MyDataType))> \_ Public Property DataType() Get Return \_DataType End Get Set(ByVal value As Object) \_DataType = value End Set End Property <Category("Misc")> <TypeConverter(GetType(NumberFormats))> \_ <Description("Displays the format of the control")> \_ Public Property Format() As String Get Return \_Format End Get Set(ByVal value As String) \_Format = value End Set End Property
End Class
Dim tPropertyName As String = "DataType"
Dim objTxt As Type = GetType(cTextBoxProperties)
Dim PiInfo As PropertyInfo = objTxt.GetType.GetProperty("DataType")
Dim ObjPropertyValue As Object = PiInfo.GetValue(objTxt, Nothing)Public Class NumberFormats : Inherits System.ComponentModel.StringConverter
Dim alist As New ArrayList Dim ControlNames() As String Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection alist = New ArrayList alist = GetNumberFormats() ControlNames = CType(alist.ToArray(GetType(System.String)), String()) Return New StandardValuesCollection(ControlNames) 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 Protected Friend Function GetNumberFormats() As ArrayList GetNumberFormats = Nothing Dim objFStream As FileStream = Nothing Dim objReader As StreamReader = Nothing Dim fiInfo As FileInfo = Nothing Dim tFontSizeFilePath As String = "" Dim tNumberFormats() As String Dim alist As New ArrayList Dim CTextbox As cTextBoxProperties = Nothing Dim tFileName As String = "" Try
'' Here Raising the ERROR