trying to add properties to a property grid with one property having a dropdown(custom type)
Im using VS2010 VB.net with reflection
For my full solution - Download it here
https://www.nyvault.com/files/reflection/xml_propgrid_reflect_sk.zip
Password is 1
The point of this project is to populate a propertyGrid I dont want to create a custom grid, i just want to populate the already made out of the box generic microsoft thing.
basically, I get the class to be created with reflection. using data from XML Some of the fields use a custom type (this will be used for the dropdown)
This is what happens when I run the solution: So i make the class, and it looks fine It creates everything and sets it up. then when I make an instance of this class in my MAIN() in calls a default constructor [new()] for the type(which is hardcoded dropdown items) instead of the custom constructor I wanted [new(byval test as integer)]
basically here are the class constructors for the custom type (located in
customlist.vb)
Public Sub New()
' Gather all the localized strings currently loaded
' Gather all the strintTables from the current project.
For i As Integer = 0 To 4
myStringCollection.Add(New MyString(100 + i, "Test " & i))
Next
End Sub
Public Sub New(ByVal val As Integer)
For i As Integer = 0 To val
myStringCollection.Add(New MyString(100 + i, "Testy " & i))
Next
End Sub
it calls the
Public Sub New()
but i want to call the
Public Sub New(ByVal val As Integer)
please help, this has been making me rip my hair out for two months.