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
4
votes
1 answer

Is it possible to hide an enum value from a PropertyGrid?

I'm working with the PropertyGrid control and using the SelectedObject property to display data within the PropertyGrid. Some of the properties in my grid are enum types. What I'd like to be able to do is hide some of the selections within the enum…
Michael Mankus
  • 4,628
  • 9
  • 37
  • 63
4
votes
4 answers

wpf propertyGrid

I need a propertyGrid for my WPF application . after lots of searches I have found this I have added the assembly (exe file) when I add the propertyGrid to my form and I run it I can't see it in the form . xaml code :
Asha
  • 3,871
  • 7
  • 44
  • 57
4
votes
1 answer

How to update PropertyGrid from a custom editor?

I'm using the PropertyGrid (in the CollectionEditor) to edit some properties of a class. The properties are actually wrapped in classes that implement ICustomTypeDescriptor. One of them uses a custom editor that inherits from UITypeEditor. When the…
Peladao
  • 4,036
  • 1
  • 23
  • 43
4
votes
3 answers

Clear InnerList elements of a custom control property after delete custom control from a form in Design Mode

I add my created custom control to the new Windows Form and add some Tab to it by "Tabs" property. However, when I delete my custom control from Windows Form, elements of "Tabs" property are not removed. Please see below figures for more…
MRS1367
  • 1,053
  • 1
  • 14
  • 40
4
votes
2 answers

c# PropertyGrid restricting edits on List items

I have a app that makes use of the PropertyGrid in C#/.NET the PropertGrid holds onto the MyAppObject class/object shown below.. class MyAppObject { private List oItems; public List Items { get { return…
IEnumerable
  • 3,610
  • 14
  • 49
  • 78
4
votes
1 answer

How can I set default value to size type property of propertyygrid in c#?

I have a propertygrid that myclass is objectsource of it. In my class I define one item from Size type. How can I set default value in item attribute ? Please see my code : [CategoryAttribute("Information"), DefaultValue(Size(0, 0))] public Size…
Ali Ahmadi
  • 2,387
  • 4
  • 31
  • 48
4
votes
1 answer

How can I access to class variable in property attribute in c#?

I define a property for my properygrid that value of it is collection of creators. I define CreatorsEditor class. In this class , I use HumanRolesCode variable. How can I access to this variable in attribute of property for set value. I want change…
Ali Ahmadi
  • 2,387
  • 4
  • 31
  • 48
4
votes
1 answer

Converting List Property into PropertyGrid compatible property entries in c#

I have a base class with a number of properties. Included in this is a list of extended properties with metadata. This is a List of a custom class containing DisplayName, Description, Name, Type & Value properties to help the PropertyGrid along. The…
dbez
  • 386
  • 1
  • 7
4
votes
1 answer

PropertyGrid with Custom PropertyDescriptor

I've been struggling quite a bit to get custom PropertyDescriptors to work the way I want with a PropertyGrid. The premise: I have a class called "Animal" which contains the properties Age, Type, Location, and Name. I have another class called…
kevin628
  • 3,458
  • 3
  • 30
  • 44
4
votes
3 answers

Display items in PropertyGrid in the sequence they are declared

Is it possible to display PropertyGrid items in the UI in the way they are declared? I found that they are sorted first by CategoryAttribute and then by DisplayName attribute in ascending order. I'm using .NET version 3.5 using Visual Studio 2010…
Donotalo
  • 12,748
  • 25
  • 83
  • 121
4
votes
1 answer

C# Winforms PropertyGrid and ErrorProvider

I'm working on extending the errorprovider to the propertygrid and treeview controls. I found a very helpful post at: Example detailing how to add the errorprovider to a propertygrid, and it works very well. My question is how did the author know…
dhysong
  • 1,011
  • 1
  • 14
  • 29
3
votes
2 answers

How to create a property to store the index of the selected value from another property?

I need help with the following problem: I have a class with two properties. private byte m_selectedValue; public byte SelectedValue { get { return m_selectedValue; } set { m_selectedValue = value; } } private string[] m_possibleValues; public…
starobrno
  • 33
  • 3
3
votes
1 answer

Category hierarchy in winforms PropertyGrid

I have some properties that could be divided in categories and sub categories. When I add them to the PropertyGrid all subcategories are in the root, but i want sub categories to be children of categories. class Settings { …
PSsam
  • 639
  • 7
  • 18
3
votes
1 answer

C# PropertyGrid drag drop

I'm trying to implement drag/drop support to a propertygrid in C# using VS2005 (.NET 2.0). The propertygrid can handle the dragenter etc. events, but there doesn't seem to be a way to get the griditem under the pointer during a drag event. The…
user109072
  • 33
  • 3
3
votes
0 answers

How Enter key behaves for a textbox in the IWindowsFormsEditorService.DropDownControl(userControl)

I have a custom control with a property Value. The property grid displays the editor in the dropdown style, using the IWindowsFormsEditorService.DropDownControl(userControl) method within the MyUITypeEditor.EditValue(...). The drop down editor has…
dattebayo
  • 2,012
  • 4
  • 30
  • 40