propertygrid

CategoryAttribute problem passing through WCF

Hi, I have a problem with WCF seemingly not including attributes such as Category when passing entities around. I have a class wrapped around an EF entity, used to populate a property grid on a thick client. I am trying to retrieve information from the server, using WCF, and to replicate the property grid on the client side. I have ...

.Net PropertyGrid DropDownList - return value different from show value

I want to be able to show in a propertygrid a dropdownlist that show some "string" value but return an "int" value. For example, let set I got this class : public class MyObjectOptions : StringConverter { public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { return true; } public ove...

How do I show like-values in custom fields in a property grid?

I have a property grid that helps me manage all of the controls on a form. These controls are for designer-type folks, so I'm not really worried that much about the user interface... until someone selects multiple objects. I have a UITypeEditor for the "BottomDiameter" property on these common objects. It keeps track of units (meters vs...

How do I remove the elipsis for a custom UITypeEditor that is read-only?

I have two fields that are of the same type in my property-grid. However, one is read-only, the other is editable. Both of these fields are of a custom type, and thus have a custom UITypeEditor, which puts the elipsis ([...]) button on the field. [ CategoryAttribute("5 - Wind"), DisplayName("Factored Area"), Descriptio...

Programatically Hide Field in PropertyGrid

Using <System.ComponentModel.TypeConverter(GetType(System.ComponentModel.ExpandableObjectConverter))> _ on the declaration of a class (which is a property of another class) that consists of a number properties. I load an instance of this class with simply ... PropertyGrid1.SelectedObject = oColumn Obviously I don't want to manuall...

How do I display custom strings when multiple items are selected?

I have a property grid that helps me manage all of the controls on a form. These controls are for designer-type folks, so I'm not really worried that much about the user interface... until someone selects multiple objects. I have a UITypeEditor for the "EffectiveDiameter" property on these common objects. It keeps track of units (meters...

c# propertygrid

I have an array of objects containing pairs of string labels and values, how would I put them all in a single property grid? public class stringVariable { public String name; public String defaultValue; public String value; }; public List<stringVariable> variables = new List<stringVariable>(); ...

Property grid only show some category

I got a PropertyGrid that is use on an object that have the following property category : Style, Calcul and Misc What I want is to only show to the user the Calcul category, but I don't want to use the browsable attribute because I want all these property to be visible in Visual studio. So, what I need, is an in-code solution. I use ....

.Net PropertyGrid Thread-safety

I have a PropertyGrid in my application that is used for editing arbitrary objects. I need to be able to run an arbitrary subroutine on another thread that also looks at these objects (search functionality, if you're curious). The obvious issue is that a user could be editing one of these objects at the same time my search thread is re...

ShowDialog, PropertyGrid and Timer problem

I have a strange bug, please, let me know if you have any clues about the reason. I have a Timer (System.Windows.Forms.Timer) on my main form, which fires some updates, which also eventually update the main form UI. Then I have an editor, which is opened from the main form using the ShowDialog() method. On this editor I have a PropertyG...

Default built-in editors for the PropertyGrid control

I can't seem to find the answer to this anywhere. What default editors/converters are building into 3.5 Framework PropertyGrid control. Otherwise what object types can I throw at it and it be able to reliably show and edit? I've found a lot of tutorials on using custom editors (which I may do at some point). But right now in my program I...

Get the default PropertyDescriptors for a type

I'm customizing how an object type is displayed in a PropertyGrid by implementing ICustomTypeDescriptor. I'm allowing the user to create their own custom properties that are stored in a single dictionary of keys and values. I'm able to create all the PropertyDescriptors for these values and view them in the property grid. However, I also...

Resetting properties from a property grid

I am using a PropertyGrid to show properties from my objects. However, I'm also allowing the user to create their own properties, and set values for these custom properties. Each object that can have these custom properties has a Dictionary collection, where the string is a unique key to identify the property, and Object is the value of ...

Italic text in a PropertyGrid

I'm using a PropertyGrid to show custom properties that are exposed through the implementation of ICustomTypeDescriptor. My objects are setup in a tree structure and values for each property are either set in each object or inherited from parent objects. In the PropertyGrid I want to visually show the user what properties values are set...

Creating / Modifying Enums at Runtime

I'm creating a program where the user has the option of creating their own custom properties that will ultimately be displayed in a PropertyGrid. Right now I don't want to mess with custom editors, so I'm only allowing primitive type properties (string, int, double, datetime, bool etc.) that the PropertyGrid already has built in editors ...

ICustomTypeDescriptor, TypeDescriptionProvider, TypeConverter, and UITypeEditor

I'm trying to get an overall understanding of how you use ICustomTypeDescriptor, TypeDescriptionProvider, TypeConverter, and UITypeEditor to change how a PropertyGrid displays and interfaces with an object. Can someone tell me if this is right, or if I missed any major concepts or points? I'm really just trying to understand why and whe...

C#: Event not showing up in the Property Grid

I am creating a special search text box. Among other things it have these two events: [Category("Behavior")] public event EventHandler<GenericEventArgs<string>> Search; [Category("Property Changed")] public event EventHandler<EventArgs> ActiveColorChanged; [Category("Property Changed")] public event EventHandle...

StringConverter with StandardValuesSupported and Autocompletion

I want to develop a StringConverter with standard values, which after attaching it to a PropertyGrid will act like comboBox with autocompletion. The example below will give me a comboBox, but without the autocompletion - user have to expand it and choose manually one of the items. Is there a way to allow user to type the beginning of one...

How can I customize category sorting on a PropertyGrid?

How can I customize the sorting of categories in a PropertyGrid? If I set either of the following... propertyGrid.PropertySort = PropertySort.Categorized; propertyGrid.PropertySort = PropertySort.CategorizedAlphabetical; ... then the categories will be alphabetized. ("Alphabetical" would seem to apply to the properties within each ca...

How do I inject a custom UITypeEditor for all properties of a closed-source type?

I want to avoid placing an EditorAttribute on every instance of a certain type that I've written a custom UITypeEditor for. I can't place an EditorAttribute on the type because I can't modify the source. I have a reference to the only PropertyGrid instance that will be used. Can I tell a PropertyGrid instance (or all instances) to u...