Questions tagged [propertygrid]

.NET control for providing a UI that allows the properties of one or more objects to be viewed and edited.

958 questions
9
votes
3 answers

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…
Cat Zimmermann
  • 1,422
  • 2
  • 21
  • 38
9
votes
4 answers

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…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
9
votes
1 answer

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…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
9
votes
3 answers

How to enumerate PropertyGrid items?

I have a PropertyGrid with assigned to it some object. var prpGrid = new PropertyGrid(); prp.SelectedObject = myObject; I want to get all grid items like I can get selectedGridItem property: var selectedProperty = prpGrid.SelectedGridItem; Can I…
Yuriy
  • 2,670
  • 6
  • 33
  • 48
9
votes
1 answer

PropertyGrid - Possible to have a file/directory selection button next to a property value?

Is it possible to have a file/directory selection button next to a property value in the PropertyGrid? Hitting the button would launch a standard "Open File" or "Select Directory" type of dialog. In a perfect world, this could be done using an…
Mats
  • 14,902
  • 33
  • 78
  • 110
9
votes
5 answers

Readonly PropertyGrid

I'm using a PropertyGrid in an application I am writing to allow users to view and sometimes edit instances of my objects. Sometimes the user may have a file open in read/write mode where they can make changes to the file through the property grid.…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
9
votes
1 answer

How do you control what is visible in a property grid at runtime?

I have a property grid displaying a list, for example of a class Person [TypeConverter(typeof(ExpandableObjectConverter))] public class Person { public bool ShowHidden { get; set; } public string Name { get; set; } //[Browsable(false)] …
John Alexiou
  • 28,472
  • 11
  • 77
  • 133
9
votes
1 answer

Change value for property item in PropertyGrid

In the picture below, "MyCars" is a collection. If an object's property is a collection, then in a PropertyGrid, the value appears as the string "(Collection)" with a button to the right if the item is selected. Is it possible to change the…
kevin628
  • 3,458
  • 3
  • 30
  • 44
9
votes
2 answers

Custom, Complicated, Dynamic Reflection Solution - C#

I have many custom classes that I am using that I will explain and post examples of. After Explaining what they all do I will try to clearly describe the conditions under which my bug is happening. First, I am using a PropertyGrid to display the…
jth41
  • 3,808
  • 9
  • 59
  • 109
9
votes
2 answers

PropertyGrid readonly property on object-level

I want to display multiple instances of one class in my PropertyGrid. The class looks like this: public class Parameter { [Description("the name")] public string Name { get; set; } [Description("the value"), ReadOnly(true)] public…
9
votes
1 answer

Using Xceed PropertyGrid

I am a beginner at C#/WPF and am trying to use the Xceed PropertyGrid. On their site they show an example:
lost_bits1110
  • 2,380
  • 6
  • 33
  • 44
8
votes
2 answers

How do I add an editable combobox to a System.Windows.Forms.PropertyGrid?

I have a System.Windows.Forms.PropertyGrid with different types of values. For a specific item, I want to show a list of useful values to choose from. The user may also type a new value. Something similar to a traditional dropdown combobox: So far,…
l33t
  • 18,692
  • 16
  • 103
  • 180
8
votes
1 answer

C#/winforms: how to best bind a propertygrid and a System.Data.DataRow

i have System.Data.DataRows with several fields, most of them just plain types like int, single, string. what is the best way to make them editable using a propertygrid? it should work automatically no matter what kind of fields the datarow has, but…
clamp
  • 33,000
  • 75
  • 203
  • 299
8
votes
2 answers

How do you create a custom collection editor form for use with the property grid?

I am trying to incorporate a property grid control with a class that has a list/collection of another class as one of the properties. Lets call them class A and the list would be containing class B for reference. I was wanting to incorporate a form…
Nathan Raley
  • 455
  • 1
  • 7
  • 16
8
votes
1 answer

Grouping my custom control properties separately in designer grid

I am working with User Controls. I have created my own control properties. Now I want to group my own properties separately in designer grid. How to achieve that? Regards
Shahzad
  • 81
  • 1
  • 3
1 2
3
63 64