PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Customizing ComboBox
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Customizing ComboBox
![]() |
Customizing ComboBox |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hey...
How are you doing? Ok, New Year's troubles... I am trying to create a custom ComboBox (inheriting from ComboBox object). Well, my whole goal is simple. I want to add some Properties, so, in Design Time, i specify from wich entity i am gonna populate my Dropdown (using Reflection and invoking a method to retrieve an arraylist with the values). But, i have to admit i am getting lost on my way to achieve it. I haven't been able to find a good article in google. I came to this forum. I need help thanks in advance Jose |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Jose,
You didn't give enough information in order to give you more concreted advice, but can't you just use standard databinding for that? -- Stoitcho Goutsev (100) "Jose Fernandez" <ppcuban@hotmail.com> wrote in message news:uTRNwbANHHA.3588@TK2MSFTNGP06.phx.gbl... > Hey... > How are you doing? > > Ok, New Year's troubles... > > I am trying to create a custom ComboBox (inheriting from ComboBox object). > > Well, my whole goal is simple. I want to add some Properties, so, in > Design Time, i specify from wich entity i am gonna populate my Dropdown > (using Reflection and invoking a method to retrieve an arraylist with the > values). > > But, i have to admit i am getting lost on my way to achieve it. > > I haven't been able to find a good article in google. I came to this > forum. > I need help > > thanks in advance > Jose > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
OK.
what i want is that when i drag the CustomcomboBox to the form, then i specify in the properties windows the name of the Entity (custom Object... Employee for example). So, using reflection, i invoke the Employee object, and then its methods LoadCombo. This method returns an arraylist with the ID and FullName of the Employee. Ok, I want to create one and only customComboBox for this. Cause every entity is going to have a LoadCombo method that will populate a Combo (by returning an arraylist). So, very easy would be just to drag the customcombobox to the form, write in the property window the entity name and voila, when press F5 you should see the combo populated with the values. "Stoitcho Goutsev (100)" <100@100.com> wrote in message news:exqf0lANHHA.2028@TK2MSFTNGP03.phx.gbl... > Jose, > > You didn't give enough information in order to give you more concreted > advice, but can't you just use standard databinding for that? > > > -- > Stoitcho Goutsev (100) > "Jose Fernandez" <ppcuban@hotmail.com> wrote in message > news:uTRNwbANHHA.3588@TK2MSFTNGP06.phx.gbl... >> Hey... >> How are you doing? >> >> Ok, New Year's troubles... >> >> I am trying to create a custom ComboBox (inheriting from ComboBox >> object). >> >> Well, my whole goal is simple. I want to add some Properties, so, in >> Design Time, i specify from wich entity i am gonna populate my Dropdown >> (using Reflection and invoking a method to retrieve an arraylist with the >> values). >> >> But, i have to admit i am getting lost on my way to achieve it. >> >> I haven't been able to find a good article in google. I came to this >> forum. >> I need help >> >> thanks in advance >> Jose >> > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
As long as every object that is associated with a ComboBox has a property
that can be DataBound to the ComboBox, you shouldn't need to do this at all. Just use normal DataBinding. -- HTH, Kevin Spencer Microsoft MVP Bit Player http://unclechutney.blogspot.com Where there's a Will, there's a William. "Jose Fernandez" <ppcuban@hotmail.com> wrote in message news:%23%23g%231uANHHA.1912@TK2MSFTNGP02.phx.gbl... > OK. > > what i want is that when i drag the CustomcomboBox to the form, then i > specify in the properties windows the name of the Entity (custom Object... > Employee for example). > So, using reflection, i invoke the Employee object, and then its methods > LoadCombo. This method returns an arraylist with the ID and FullName of > the Employee. > > Ok, I want to create one and only customComboBox for this. Cause every > entity is going to have a LoadCombo method that will populate a Combo (by > returning an arraylist). So, very easy would be just to drag the > customcombobox to the form, write in the property window the entity name > and voila, when press F5 you should see the combo populated with the > values. > > > > "Stoitcho Goutsev (100)" <100@100.com> wrote in message > news:exqf0lANHHA.2028@TK2MSFTNGP03.phx.gbl... >> Jose, >> >> You didn't give enough information in order to give you more concreted >> advice, but can't you just use standard databinding for that? >> >> >> -- >> Stoitcho Goutsev (100) >> "Jose Fernandez" <ppcuban@hotmail.com> wrote in message >> news:uTRNwbANHHA.3588@TK2MSFTNGP06.phx.gbl... >>> Hey... >>> How are you doing? >>> >>> Ok, New Year's troubles... >>> >>> I am trying to create a custom ComboBox (inheriting from ComboBox >>> object). >>> >>> Well, my whole goal is simple. I want to add some Properties, so, in >>> Design Time, i specify from wich entity i am gonna populate my Dropdown >>> (using Reflection and invoking a method to retrieve an arraylist with >>> the values). >>> >>> But, i have to admit i am getting lost on my way to achieve it. >>> >>> I haven't been able to find a good article in google. I came to this >>> forum. >>> I need help >>> >>> thanks in advance >>> Jose >>> >> >> > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
I agree with Kevin. Take a look at the databinding feature. At the very this
is what databinding is all about. -- Stoitcho Goutsev (100) "Kevin Spencer" <unclechutney@nothinks.com> wrote in message news:utoFVMCNHHA.4000@TK2MSFTNGP06.phx.gbl... > As long as every object that is associated with a ComboBox has a property > that can be DataBound to the ComboBox, you shouldn't need to do this at > all. Just use normal DataBinding. > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Bit Player > http://unclechutney.blogspot.com > > Where there's a Will, there's a William. > > "Jose Fernandez" <ppcuban@hotmail.com> wrote in message > news:%23%23g%231uANHHA.1912@TK2MSFTNGP02.phx.gbl... >> OK. >> >> what i want is that when i drag the CustomcomboBox to the form, then i >> specify in the properties windows the name of the Entity (custom >> Object... Employee for example). >> So, using reflection, i invoke the Employee object, and then its methods >> LoadCombo. This method returns an arraylist with the ID and FullName of >> the Employee. >> >> Ok, I want to create one and only customComboBox for this. Cause every >> entity is going to have a LoadCombo method that will populate a Combo (by >> returning an arraylist). So, very easy would be just to drag the >> customcombobox to the form, write in the property window the entity name >> and voila, when press F5 you should see the combo populated with the >> values. >> >> >> >> "Stoitcho Goutsev (100)" <100@100.com> wrote in message >> news:exqf0lANHHA.2028@TK2MSFTNGP03.phx.gbl... >>> Jose, >>> >>> You didn't give enough information in order to give you more concreted >>> advice, but can't you just use standard databinding for that? >>> >>> >>> -- >>> Stoitcho Goutsev (100) >>> "Jose Fernandez" <ppcuban@hotmail.com> wrote in message >>> news:uTRNwbANHHA.3588@TK2MSFTNGP06.phx.gbl... >>>> Hey... >>>> How are you doing? >>>> >>>> Ok, New Year's troubles... >>>> >>>> I am trying to create a custom ComboBox (inheriting from ComboBox >>>> object). >>>> >>>> Well, my whole goal is simple. I want to add some Properties, so, in >>>> Design Time, i specify from wich entity i am gonna populate my Dropdown >>>> (using Reflection and invoking a method to retrieve an arraylist with >>>> the values). >>>> >>>> But, i have to admit i am getting lost on my way to achieve it. >>>> >>>> I haven't been able to find a good article in google. I came to this >>>> forum. >>>> I need help >>>> >>>> thanks in advance >>>> Jose >>>> >>> >>> >> >> > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

