Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
GeneralUsing Dropdownlist in Datagrid Pin
t_m2002052111-Dec-03 9:29
t_m2002052111-Dec-03 9:29 
GeneralRe: Using Dropdownlist in Datagrid Pin
Heath Stewart11-Dec-03 10:35
protectorHeath Stewart11-Dec-03 10:35 
GeneralComboBox DropDown Pin
Shaun Becker11-Dec-03 7:32
Shaun Becker11-Dec-03 7:32 
GeneralRe: ComboBox DropDown Pin
Not Active11-Dec-03 7:58
mentorNot Active11-Dec-03 7:58 
GeneralRe: ComboBox DropDown Pin
Shaun Becker11-Dec-03 8:23
Shaun Becker11-Dec-03 8:23 
GeneralRe: ComboBox DropDown Pin
Heath Stewart11-Dec-03 10:31
protectorHeath Stewart11-Dec-03 10:31 
GeneralLooking for other controls in design-time Pin
f_popovic11-Dec-03 6:34
f_popovic11-Dec-03 6:34 
GeneralRe: Looking for other controls in design-time Pin
Heath Stewart11-Dec-03 10:23
protectorHeath Stewart11-Dec-03 10:23 
First of all, you should be checking for null for each property of your ITypeDescriptorContext before your foreach statement, or put the whole thing in a try-catch to avoid unnecessary errors (though throwing exceptions is far less efficient that performing checks).

Second, you can simplify this by letting the ComponentModel handle this itself. If you specify a design-time visible property that is a Type you are interested in, the designer will automatically provide a drop-down for those types (or at least it's documented that way). This only works for components if I remember correctly, though.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Looking for other controls in design-time Pin
f_popovic12-Dec-03 0:17
f_popovic12-Dec-03 0:17 
GeneralRe: Looking for other controls in design-time Pin
Heath Stewart12-Dec-03 3:50
protectorHeath Stewart12-Dec-03 3:50 
GeneralRe: Looking for other controls in design-time Pin
f_popovic13-Dec-03 23:43
f_popovic13-Dec-03 23:43 
GeneralRe: Looking for other controls in design-time Pin
Heath Stewart14-Dec-03 5:36
protectorHeath Stewart14-Dec-03 5:36 
GeneralRe: Looking for other controls in design-time Pin
f_popovic14-Dec-03 21:33
f_popovic14-Dec-03 21:33 
GeneralApp.Config refresh Pin
RB@Emphasys11-Dec-03 5:10
RB@Emphasys11-Dec-03 5:10 
GeneralRe: App.Config refresh Pin
Guillermo Rivero11-Dec-03 7:17
Guillermo Rivero11-Dec-03 7:17 
GeneralRe: App.Config refresh Pin
Heath Stewart11-Dec-03 10:15
protectorHeath Stewart11-Dec-03 10:15 
GeneralC# HTTP Text Browser Pin
Guiro11-Dec-03 2:10
Guiro11-Dec-03 2:10 
GeneralRe: C# HTTP Text Browser Pin
Heath Stewart11-Dec-03 4:15
protectorHeath Stewart11-Dec-03 4:15 
GeneralRe: C# HTTP Text Browser Pin
Guiro12-Dec-03 2:57
Guiro12-Dec-03 2:57 
GeneralRe: C# HTTP Text Browser Pin
Heath Stewart12-Dec-03 3:51
protectorHeath Stewart12-Dec-03 3:51 
GeneralEnumerating Virtual Folders Pin
DotNetEvangelist11-Dec-03 2:04
DotNetEvangelist11-Dec-03 2:04 
GeneralRe: Enumerating Virtual Folders Pin
totig11-Dec-03 3:23
totig11-Dec-03 3:23 
General.NET IDE c# Pin
Hovel11-Dec-03 0:41
Hovel11-Dec-03 0:41 
GeneralRe: .NET IDE c# Pin
Anonymous11-Dec-03 2:33
Anonymous11-Dec-03 2:33 
GeneralRe: .NET IDE c# Pin
Charlie Williams11-Dec-03 16:11
Charlie Williams11-Dec-03 16:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.