c# Property Grid – Getting a combo box
by brian on Oct.31, 2008, under Uncategorized
You’d think getting a combox display into the property grid would be really simple to do since it’s used everywhere in Visual Studio 2008. And although it isn’t horrible it isn’t exactly straight forward. I found a couple of dead-ends, poorly explained, or difficult to find the pith of examples. Finally I ran across this one at http://gaaton.blogspot.com/ It’s nice and concise, easy to understand, and easy to adapt. I’m going to put in my sample which essentially taken from gaaton.
internal class ProtcolConverter : StringConverter
{
public override bool
GetStandardValuesSupported(
ITypeDescriptorContext context)
{
//True - means show a Combobox
//and False for show a Modal
return true;
}
public override bool
GetStandardValuesExclusive(
ITypeDescriptorContext context)
{
//False - a option to edit values
//and True - set values to state readonly
return true;
}
public override StandardValuesCollection
GetStandardValues(
ITypeDescriptorContext context)
{
return new StandardValuesCollection(
new string[] { "net.tcp", "http" });
}
}
And finally the we need to attach the string converter to the property by the following.
[TypeConverter(typeof(ProtcolConverter))]
public string ServiceProtocol
{
get { return MediaServiceConfig.WCFProtocol; }
set { MediaServiceConfig.WCFProtocol = value; }
}
Enjoy.

September 6th, 2010 on 7:19 am
Buy:Levitra.Viagra Super Force.Maxaman.Cialis Super Active+.Viagra.Super Active ED Pack.VPXL.Cialis Soft Tabs.Propecia.Viagra Soft Tabs.Tramadol.Cialis.Zithromax.Cialis Professional.Viagra Professional.Soma.Viagra Super Active+….
November 11th, 2010 on 5:06 pm
…
BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…
July 21st, 2011 on 11:06 am
buy@generic.LEVITRA” rel=”nofollow”>……
Need cheap generic LEVITRA?…
July 29th, 2011 on 12:24 am
Order@Cheap.Coral.Calcium” rel=”nofollow”>..…
Buygeneric pills…
July 29th, 2011 on 12:48 am
Order@Discount.Coral.Calcium” rel=”nofollow”>..…
Buyno prescription…
July 29th, 2011 on 12:58 pm
Purchase@Cheap.Abilify” rel=”nofollow”>..…
Buynow it…
July 31st, 2011 on 11:31 am
Buy@Coral.Calcium.Online” rel=”nofollow”>.…
Buygeneric drugs…
July 31st, 2011 on 2:09 pm
Order@Discount.Coral.Calcium” rel=”nofollow”>..…
Buygeneric meds…
July 31st, 2011 on 7:15 pm
Purchase@Cheap.Abana” rel=”nofollow”>……
Buywithout prescription…
August 3rd, 2011 on 1:08 pm
Buy@Cheap.Acai” rel=”nofollow”>……
Buygeneric drugs…
August 3rd, 2011 on 10:13 pm
Purchase@Cheap.Acai” rel=”nofollow”>……
Buyit now…
August 4th, 2011 on 1:34 am
Cheap@Acai.Online” rel=”nofollow”>.…
Buygeneric meds…
August 4th, 2011 on 8:08 am
Buy@Generic.Acai” rel=”nofollow”>..…
Buynow it…
August 6th, 2011 on 4:10 am
Order@Discount.Accutane” rel=”nofollow”>.…
Buyno prescription…
August 7th, 2011 on 6:35 pm
Buy@Generic.Aciphex” rel=”nofollow”>.…
Buygeneric meds…
August 8th, 2011 on 2:01 pm
Purchase@Generic.Aciphex.20mg” rel=”nofollow”>.…
Buynow it…
August 9th, 2011 on 9:50 pm
Buy@Generic.Actonel” rel=”nofollow”>.…
Buygeneric drugs…
August 10th, 2011 on 12:39 am
Buy@Generic.Actonel.Without.Prescription” rel=”nofollow”>.…
Buygeneric meds…
August 10th, 2011 on 1:39 pm
Purchase@Generic.Actonel” rel=”nofollow”>.…
Buygeneric meds vbg…
August 10th, 2011 on 2:14 pm
Purchase@Actonel.Without.Prescription” rel=”nofollow”>..…
Buynow it vhx…
August 12th, 2011 on 11:01 pm
Buy@Discount.Abana” rel=”nofollow”>.…
Buygeneric drugs zfk…
August 13th, 2011 on 8:06 am
Purchase@Discount.Abilify” rel=”nofollow”>..…
Buywithout prescription dyo…
August 13th, 2011 on 12:47 pm
Order@Generic.Abilify” rel=”nofollow”>.…
Buyno prescription luw…
August 13th, 2011 on 8:10 pm
Generic@Abilify.5mg.10mg.15mg.20mg.30mg.Without.Prescription” rel=”nofollow”>..…
Buydrugs without prescription faj…
August 14th, 2011 on 4:53 am
Purchase@Acai.Online” rel=”nofollow”>.…
Buyit now ojb…
August 14th, 2011 on 10:39 pm
Buy@Generic.Acai.500mg” rel=”nofollow”>.…
Buygeneric drugs nih…
August 16th, 2011 on 6:27 am
Purchase@Cheap.Accupril” rel=”nofollow”>..…
Buyit now irl…
August 16th, 2011 on 7:35 am
Purchase@Discount.Accupril” rel=”nofollow”>……
Buygeneric meds svb…
August 17th, 2011 on 2:14 am
Cheap@Accutane.Online” rel=”nofollow”>.…
Buynow it lmg…
August 19th, 2011 on 4:00 am
Cheap@Generic.Aciphex.20mg” rel=”nofollow”>……
Buynow it zdg…
August 19th, 2011 on 7:36 am
Buy@Acomplia.Online” rel=”nofollow”>..…
Buyno prescription wkp…
August 19th, 2011 on 9:35 pm
Purchase@Discount.Acomplia” rel=”nofollow”>..…
Buygeneric drugs ajd…
August 21st, 2011 on 1:44 am
Cheap@Acomplia.Online” rel=”nofollow”>..…
Buygeneric drugs nvr…
August 25th, 2011 on 6:02 pm
Get@Albenza.Online” rel=”nofollow”>……
Buynow fjl…
August 26th, 2011 on 5:46 am
abilify@and.weight.gain” rel=”nofollow”>……
Buyno prescription…
August 29th, 2011 on 12:40 am
phamacokinetic@of.amikacin” rel=”nofollow”>..…
Buygeneric drugs…
August 29th, 2011 on 2:46 am
ampicillin@500.mg” rel=”nofollow”>.…
Buydrugs without prescription…
October 18th, 2011 on 9:29 am
methotrexate and tricyclerides side effects…
Buy_generic pills…
October 18th, 2011 on 2:29 pm
cancer tattoos…
Buy_without prescription…
October 21st, 2011 on 2:21 pm
obesity children summer…
Buy_it now…
October 22nd, 2011 on 7:01 am
prostate cancer injection treatment…
Buy_now it…
October 23rd, 2011 on 5:17 am
medication for ibs…
Buy_generic drugs…
October 26th, 2011 on 12:42 pm
effects of bulimia only sometimes…
Buy_generic meds…
October 27th, 2011 on 12:22 am
boniva price…
Buy_drugs without prescription…
October 27th, 2011 on 11:42 pm
australia clinical research resume…
Buy_generic drugs…
October 28th, 2011 on 6:02 pm
tests for assessing anxiety…
Buy_now it…
October 28th, 2011 on 8:38 pm
thyroid scan image…
Buy_generic pills…
October 29th, 2011 on 1:15 pm
side effects of luvox…
Buy_now…
October 31st, 2011 on 5:39 pm
tylenol without codeine related constipation…
Buy_it now…
November 2nd, 2011 on 2:59 am
advantage of skin cancer…
Buy_generic drugs…
November 2nd, 2011 on 4:39 am
negative thyroid test…
Buy_no prescription…
November 2nd, 2011 on 4:19 pm
household chemicals that kill fleas…
Buy_now it…
November 3rd, 2011 on 1:05 pm
atkins diet first week foods…
Buy_without prescription…
November 3rd, 2011 on 2:46 pm
fungi amazing facts…
Buy_drugs without prescription…
November 4th, 2011 on 9:42 pm
dog hives and what causes them…
Buy_drugs without prescription…
November 5th, 2011 on 4:02 pm
depression amino acids…
Buy_drugs without prescription…
November 5th, 2011 on 7:23 pm
best drug store foundation…
Buy_generic meds…
November 6th, 2011 on 8:43 am
when develop toxemia pregnancy…
Buy_it now…
November 6th, 2011 on 11:43 pm
acne teens start treatment age…
Buy_it now…
November 7th, 2011 on 3:03 am
period changes leading up to menopause…
Buy_it now…
November 7th, 2011 on 4:22 pm
drug additiction symptoms…
Buy_generic meds…
November 10th, 2011 on 4:57 pm
new birth control pill…
Buy_now it…
November 12th, 2011 on 7:17 am
zocor orange juice effects…
Buy_no prescription…
November 12th, 2011 on 8:37 pm
childrens ibuprofen diabetes…
Buy_without prescription…
November 13th, 2011 on 6:17 pm
tsa drug dogs for adoptino…
Buy_generic drugs…
November 16th, 2011 on 3:15 am
barbecue interactions with drugs…
Buy_generic meds…
December 9th, 2011 on 2:09 am
green@mountain.coffee.cafe.club” rel=”nofollow”>……
Buygeneric meds…
December 10th, 2011 on 2:02 am
augmentin@duo.buy” rel=”nofollow”>……
Buygeneric pills…
December 10th, 2011 on 2:10 am
avodart@and.rogane” rel=”nofollow”>.…
Buydrugs without prescription…
December 10th, 2011 on 2:22 am
can@hair.grow.back.after.hair.loss.from.protonix” rel=”nofollow”>.…
Buynow it…
December 10th, 2011 on 2:31 am
rogaine@foam.canada” rel=”nofollow”>.…
Buyno prescription…