EDN Admin
Well-known member
Well, Ive asked something similar before, but I have a much better description of what I want, and what happens when I try to get it.
First look at the below classes, and please just ignore the QWCollection() stuff, just trust the deduction that QWCollection() implements ALL of the appropriate aspects in order to provide the valid data for this example.
Now, these are all component collections, meaning they will display in the toolbox, and thus can be just added to a form. granted these below examples are pointless, but thats the point of the debug session,
.
First, i add three bindingsources to the form, and then one ParentList to the form. The build in (to QWCollection) GetItemProperties and GetListName() from ITypedList() are designed to cycle through the "PropertyDescriptors" of sub-Lists.
Meaning that the GetItemProperties of ParentList, returns all the properties of the Parent Class. One of Which is Bindable() as another ITypedList.
So I take BindingSource1 and set the DataSource to ParentList1 and the DataMember to Children. Upon dropping down the DataSource property in the designer, GetItemProperties is called with no Accessors. upon selecting the ParentList1 as the datasource,
it is called again with no accessors. When stting the DataMember property to Children, a property of the Parent class, the method is called once with no accessors, but when you select the property for the datamember drop down goes away, GetItemProperties
is called multiple times, with no Accessors, and with the Children PropDescriptor as the Accessor, usually the lastiteration of the GetItemProperties() is called, the Accessor is the Children Property Descriptor. This works wonderfully by the way and
if this was all i wanted life would be good.
Next, I want to have all of the GrandChildren views to be based upon the current Children view. Thus I select parent, and you get that parents children, you select one of the children and you get that childs children (or the parents grandchildren).
So naturally, the BindingSource2 DataSource is to be set to BindingSource1. When I drop down the DataSource combo on BindingSource2, GetItemProperties is Called 3 times, twice with No accessor, once with Children as the accessor. When I select BindingSource1,
the method is called 2 times more, once with no accessor, once with children. Now for the key moment. When I drop down the DataMember property for the BindingSource2, it is providing me the list of properties for its element. If BS1 is looking
at all the children for a given parent, then BS2 is looking at all the GrandChildren for the same parent through the current child. So BS2 gets the properties from the Child class which includes the GrandChildren list, and then sets itself to that.
GetItemProperties executes in a flurry, of no acessors, once or twice, Children as the accessor a bunch of times, and Children and GrandChildren as the accessor two or three times. During this process An exception occurs in my debuging environment:
<span style="text-decoration:underline "The list must be an IBindingList to AddNew()."
Well, this is not the "exact" case. In the CurrencyManager.AddNew() method, it checks to see if the internal list is nothing (null). Well, for BindingSource1, this isnt a problem. ParentList() allows the background designer to
create via reflection the Parent Class, and thus is able to grab an instance of the lazy-loaded Children property (ChildList class). HOwever, it gets murky here, that for some reason the designer wont go the step further (or perhaps I need to) and when
It tries to access the Child class (as the list items from the ChildList of the Parent Class) it bombs.
Granted, I can set up my applications to associate these things at run-time. But thats a pain in the neck. The Forms Designer is allowing me to assign:
BS1 - ParentList
BS2 - BS1, Children
BS3 - BS2, GrandChildren
BS4 - BS3, GreatGrandChildren
THus when i Load up data, with databound controls to each of the appropriate BSes, they will populate as they can, but for some reason the currency manager an other such back ground elements of .Net get picky with the "Nothing" value. Instead
of just ignoring it and providing no data for that control, it complains.
Is this intended? When I want to look at the nested classes in a visual manner, is it just expected that we always have to trap the BindingSource "PositionChanged" or "CurrentItemChanged" events in order to continue the bindingsource
hooks if the current of the parent Bindingsource is valid?
I would think I could just set this all up once and then walk away. If Parent has a few kids, but Kid 1 doesnt have any kids of their own, this should NOT (in my opinion) cause a problem with the GreatGrandChildren controls.
Suggestions, Ideas?
Thanks
Jaeden "Sifo Dyas" alRaec Ruiner
<div style="color:Black;background-color:White; <pre>
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class ParentList
<span style="color:Blue; Inherits QWCollection(Of Parent)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "ParentList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class Parent
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _pProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _pProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _pProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; Private _children <span style="color:Blue; As ChildList
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<Browsable(<span style="color:Blue; True), Bindable(<span style="color:Blue; True), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
<span style="color:Blue; Public <span style="color:Blue; ReadOnly <span style="color:Blue; Property Children() <span style="color:Blue; As ChildList
<span style="color:Blue; Get
<span style="color:Blue; If <span style="color:Blue; Not _children.isValid() <span style="color:Blue; Then _children = <span style="color:Blue; New ChildList()
<span style="color:Blue; Return _children
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _pProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_pProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _pProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_pProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _pProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_pProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class ChildList
<span style="color:Blue; Inherits QWCollection(Of Child)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "ParentList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class Child
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _cProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _cProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _cProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; Private _children <span style="color:Blue; As GrandChildList
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<Browsable(<span style="color:Blue; True), Bindable(<span style="color:Blue; True), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
<span style="color:Blue; Public <span style="color:Blue; ReadOnly <span style="color:Blue; Property GrandChildren() <span style="color:Blue; As GrandChildList
<span style="color:Blue; Get
<span style="color:Blue; If <span style="color:Blue; Not _children.isValid() <span style="color:Blue; Then _children = <span style="color:Blue; New GrandChildList()
<span style="color:Blue; Return _children
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _cProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_cProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _cProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_cProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _cProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_cProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class GrandChildList
<span style="color:Blue; Inherits QWCollection(Of GrandChild)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "ChildList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class GrandChild
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _gProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _gProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _gProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; Private _greats <span style="color:Blue; As GreatGrandChildList
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<Browsable(<span style="color:Blue; True), Bindable(<span style="color:Blue; True), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
<span style="color:Blue; Public <span style="color:Blue; ReadOnly <span style="color:Blue; Property GreadGrandChildren() <span style="color:Blue; As GreatGrandChildList
<span style="color:Blue; Get
<span style="color:Blue; If <span style="color:Blue; Not _greats.isValid() <span style="color:Blue; Then _greats = <span style="color:Blue; New GreatGrandChildList()
<span style="color:Blue; Return _greats
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _gProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_gProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _gProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_gProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _gProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_gProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class GreatGrandChildList
<span style="color:Blue; Inherits QWCollection(Of GreatGrandChild)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "GreatGrandChildList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class GreatGrandChild
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _ggProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _ggProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _ggProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _ggProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_ggProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _ggProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_ggProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _ggProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_ggProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
[/code]
<br/>
<hr class="sig "Never Trust a computer. Your brain is smarter than any micro-chip."
<br/>
PS - Dont mark answers on other peoples questions. There are such things as Vacations and Holidays which may reduce timely activity, and until the person asking the question can test your answer, it is not correct just because you think it is. Marking it
correct for them often stops other people from even reading the question and possibly providing the real "correct" answer.
View the full article
First look at the below classes, and please just ignore the QWCollection() stuff, just trust the deduction that QWCollection() implements ALL of the appropriate aspects in order to provide the valid data for this example.
Now, these are all component collections, meaning they will display in the toolbox, and thus can be just added to a form. granted these below examples are pointless, but thats the point of the debug session,

First, i add three bindingsources to the form, and then one ParentList to the form. The build in (to QWCollection) GetItemProperties and GetListName() from ITypedList() are designed to cycle through the "PropertyDescriptors" of sub-Lists.
Meaning that the GetItemProperties of ParentList, returns all the properties of the Parent Class. One of Which is Bindable() as another ITypedList.
So I take BindingSource1 and set the DataSource to ParentList1 and the DataMember to Children. Upon dropping down the DataSource property in the designer, GetItemProperties is called with no Accessors. upon selecting the ParentList1 as the datasource,
it is called again with no accessors. When stting the DataMember property to Children, a property of the Parent class, the method is called once with no accessors, but when you select the property for the datamember drop down goes away, GetItemProperties
is called multiple times, with no Accessors, and with the Children PropDescriptor as the Accessor, usually the lastiteration of the GetItemProperties() is called, the Accessor is the Children Property Descriptor. This works wonderfully by the way and
if this was all i wanted life would be good.
Next, I want to have all of the GrandChildren views to be based upon the current Children view. Thus I select parent, and you get that parents children, you select one of the children and you get that childs children (or the parents grandchildren).
So naturally, the BindingSource2 DataSource is to be set to BindingSource1. When I drop down the DataSource combo on BindingSource2, GetItemProperties is Called 3 times, twice with No accessor, once with Children as the accessor. When I select BindingSource1,
the method is called 2 times more, once with no accessor, once with children. Now for the key moment. When I drop down the DataMember property for the BindingSource2, it is providing me the list of properties for its element. If BS1 is looking
at all the children for a given parent, then BS2 is looking at all the GrandChildren for the same parent through the current child. So BS2 gets the properties from the Child class which includes the GrandChildren list, and then sets itself to that.
GetItemProperties executes in a flurry, of no acessors, once or twice, Children as the accessor a bunch of times, and Children and GrandChildren as the accessor two or three times. During this process An exception occurs in my debuging environment:
<span style="text-decoration:underline "The list must be an IBindingList to AddNew()."
Well, this is not the "exact" case. In the CurrencyManager.AddNew() method, it checks to see if the internal list is nothing (null). Well, for BindingSource1, this isnt a problem. ParentList() allows the background designer to
create via reflection the Parent Class, and thus is able to grab an instance of the lazy-loaded Children property (ChildList class). HOwever, it gets murky here, that for some reason the designer wont go the step further (or perhaps I need to) and when
It tries to access the Child class (as the list items from the ChildList of the Parent Class) it bombs.
Granted, I can set up my applications to associate these things at run-time. But thats a pain in the neck. The Forms Designer is allowing me to assign:
BS1 - ParentList
BS2 - BS1, Children
BS3 - BS2, GrandChildren
BS4 - BS3, GreatGrandChildren
THus when i Load up data, with databound controls to each of the appropriate BSes, they will populate as they can, but for some reason the currency manager an other such back ground elements of .Net get picky with the "Nothing" value. Instead
of just ignoring it and providing no data for that control, it complains.
Is this intended? When I want to look at the nested classes in a visual manner, is it just expected that we always have to trap the BindingSource "PositionChanged" or "CurrentItemChanged" events in order to continue the bindingsource
hooks if the current of the parent Bindingsource is valid?
I would think I could just set this all up once and then walk away. If Parent has a few kids, but Kid 1 doesnt have any kids of their own, this should NOT (in my opinion) cause a problem with the GreatGrandChildren controls.
Suggestions, Ideas?
Thanks
Jaeden "Sifo Dyas" alRaec Ruiner
<div style="color:Black;background-color:White; <pre>
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class ParentList
<span style="color:Blue; Inherits QWCollection(Of Parent)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "ParentList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class Parent
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _pProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _pProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _pProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; Private _children <span style="color:Blue; As ChildList
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<Browsable(<span style="color:Blue; True), Bindable(<span style="color:Blue; True), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
<span style="color:Blue; Public <span style="color:Blue; ReadOnly <span style="color:Blue; Property Children() <span style="color:Blue; As ChildList
<span style="color:Blue; Get
<span style="color:Blue; If <span style="color:Blue; Not _children.isValid() <span style="color:Blue; Then _children = <span style="color:Blue; New ChildList()
<span style="color:Blue; Return _children
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _pProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_pProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _pProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_pProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _pProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_pProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class ChildList
<span style="color:Blue; Inherits QWCollection(Of Child)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "ParentList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class Child
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _cProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _cProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _cProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; Private _children <span style="color:Blue; As GrandChildList
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<Browsable(<span style="color:Blue; True), Bindable(<span style="color:Blue; True), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
<span style="color:Blue; Public <span style="color:Blue; ReadOnly <span style="color:Blue; Property GrandChildren() <span style="color:Blue; As GrandChildList
<span style="color:Blue; Get
<span style="color:Blue; If <span style="color:Blue; Not _children.isValid() <span style="color:Blue; Then _children = <span style="color:Blue; New GrandChildList()
<span style="color:Blue; Return _children
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _cProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_cProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _cProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_cProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _cProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_cProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class GrandChildList
<span style="color:Blue; Inherits QWCollection(Of GrandChild)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "ChildList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class GrandChild
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _gProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _gProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _gProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; Private _greats <span style="color:Blue; As GreatGrandChildList
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<Browsable(<span style="color:Blue; True), Bindable(<span style="color:Blue; True), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
<span style="color:Blue; Public <span style="color:Blue; ReadOnly <span style="color:Blue; Property GreadGrandChildren() <span style="color:Blue; As GreatGrandChildList
<span style="color:Blue; Get
<span style="color:Blue; If <span style="color:Blue; Not _greats.isValid() <span style="color:Blue; Then _greats = <span style="color:Blue; New GreatGrandChildList()
<span style="color:Blue; Return _greats
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _gProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_gProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _gProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_gProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _gProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_gProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<ToolboxItem(<span style="color:Blue; True)> _
<span style="color:Blue; Public <span style="color:Blue; Class GreatGrandChildList
<span style="color:Blue; Inherits QWCollection(Of GreatGrandChild)
<span style="color:Green; #Region "-------------::< Class Properties >::-------------"
<span style="color:Green; Public Overrides ReadOnly Property ListName() As String
<span style="color:Green; Get
<span style="color:Green; Return "GreatGrandChildList"
<span style="color:Green; End Get
<span style="color:Green; End Property
<span style="color:Green; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Constructors >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New()
<span style="color:Blue; MyBase.<span style="color:Blue; new()
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; Public <span style="color:Blue; Sub <span style="color:Blue; New(<span style="color:Blue; ByVal container <span style="color:Blue; As System.ComponentModel.IContainer)
<span style="color:Blue; MyBase.<span style="color:Blue; new(container)
<span style="color:Blue; End <span style="color:Blue; Sub
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
<span style="color:Blue; Public <span style="color:Blue; Class GreatGrandChild
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Fields & Constants >::-------------"
<span style="color:Blue; Private _ggProp1 <span style="color:Blue; As <span style="color:Blue; String = <span style="color:#A31515; ""
<span style="color:Blue; Private _ggProp2 <span style="color:Blue; As <span style="color:Blue; Integer = 0
<span style="color:Blue; Private _ggProp3 <span style="color:Blue; As <span style="color:Blue; Boolean = <span style="color:Blue; False
<span style="color:Blue; #End Region
<span style="color:Blue; #Region <span style="color:#A31515; "-------------::< Class Properties >::-------------"
<span style="color:Blue; Public <span style="color:Blue; Property Property1() <span style="color:Blue; As <span style="color:Blue; String
<span style="color:Blue; Get
<span style="color:Blue; Return _ggProp1
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; String)
_ggProp1 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property2() <span style="color:Blue; As <span style="color:Blue; Integer
<span style="color:Blue; Get
<span style="color:Blue; Return _ggProp2
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Integer)
_ggProp2 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; Public <span style="color:Blue; Property Property3() <span style="color:Blue; As <span style="color:Blue; Boolean
<span style="color:Blue; Get
<span style="color:Blue; Return _ggProp3
<span style="color:Blue; End <span style="color:Blue; Get
<span style="color:Blue; Set(<span style="color:Blue; ByVal value <span style="color:Blue; As <span style="color:Blue; Boolean)
_ggProp3 = value
<span style="color:Blue; End <span style="color:Blue; Set
<span style="color:Blue; End <span style="color:Blue; Property
<span style="color:Blue; #End Region
<span style="color:Blue; End <span style="color:Blue; Class
[/code]
<br/>
<hr class="sig "Never Trust a computer. Your brain is smarter than any micro-chip."
<br/>
PS - Dont mark answers on other peoples questions. There are such things as Vacations and Holidays which may reduce timely activity, and until the person asking the question can test your answer, it is not correct just because you think it is. Marking it
correct for them often stops other people from even reading the question and possibly providing the real "correct" answer.
View the full article