propertygrid

winforms propertyGrid

Hi! I'm new with DOT.NET... I'm trying to do: Build a winform with tree of lectures below i put a propertyGrid The propertyGrid must display the details of Lecture:The Subject,language ang Lectors. I want to add lectors to certain lecture "Lectors Collection" property in collection editor Question: I need the LectureID parameter to be...

TypeConverter in propertygrid only converts from string, not to.

Only the ConvertTo method gets called(a lot of times) when accessing the propertygrid. This correctly returns the "Foo!" string in the propertygrid. When I click to edit I get an exception Cannot convert object of type Foo to type System.String.(not exactly, translated). The ConvertFrom method doesn't get called, any clues why? And the e...

C# Property for a list of classes

I'm trying to use the property grid in the designer for Visual Studio. I have a list of classes that I want the developer to be able to add to at design time so that the user can have access to extra features. Here is some example code of what I have in the code already. The problem is when the developer goes to the design mode he c...

PropertyGrid GenericList with GenericItems

Is there a way to display and edit values in the PropertyGrid (and his CollectionEditor) of an object, which is derived from an abstract generic class? I don't get the properties displayed only something like this: "IFilter´1" or "BaseFilter'1" Where IFilter is an Interface, and BaseFilter an abstract class. All objects contained by thi...

How to limit a PropertyGrid collection to a List<T>

Okay, I've read a couple of questions regarding the use of the PropertyGrid and collections. But, I'm having a difficult time understanding how/if [TypeConverter] will work for me. I've read the little blurb-age that MSDN puts out there, and frankly, it's a bit lacking to this poor, self-taught programmer. So, here is what I have. First...

How do you programmatically adjust the horizontal divider of a PropertyGrid control?

I am using a .NET PropertyGrid control in my C# project. When the form containing the grid loads, the horizontal splitter (which divides the Settings from the Description) is at a default position. How do I change the position of that splitter programmatically in C#? ...

About Marc Gravell's RowWrapperDescriptor for binding System.Data.Rows to PropertyGrid

Howdy, I came across Marc Gravell's elegant and witty solution to the problem posted by Matt ( title "C#/winforms: how to best bind a propertygrid and a System.Data.DataRow" ), and have used same solution in one of my applications. Using some excerpts from Marc's code : DataTable table = new DataTable(); table.Columns.Add("ID...

Copy Paste is Disabled in Property Grid

Hi All, I have a FileNameEditor inside a property grid, which has a few entries like Main File : "C:\blah1" Sec File: "C:\blah2" and so on. My problem is that I cannot copy and paste from one property entry to another, and I cannot type in the fields manually as well. Is there a specific property that will enable editing inside the...

RefreshProperties attribute at class level in .net, winforms + incorrectly refreshing property grid

I had a strange problem editing a class in the property grid whereby the property grid would refresh incorrectly. I managed to reduce the problem down to a class with just two properties. I've included the code at the end to ease explanation. It basically boils down to a class with two properties. The first of which is expandable (a fo...

Problem editing custom readonly collection in property grid, .net, winforms.

I have a custom collection, lets says COL, that derives from ObjectModel.Collection. I have my own collection editor that works fine when a property, of type COL, is Read and Write enabled. However, if I change the property to ReadOnly, the open editor button stops showing in the property grid. As a test, I override my custom editor wi...

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. In other cases they may have a file open in read only mode, and should not be able to make...

Programmatically hiding properties in a PropertyGrid

Hi, I'm looking to hide/show properties depending on what selection the user makes in a drop. I am handling the event fine, but cannot actually make the correct properties disappear. The solutions I have found on line are mainly from 2005 and as I've had very little experience with it I thought I must be doing something wrong if hiding ...

win api c# property grid value

How do I get property or tree Grid value in component on 3-th software on my program witch WinAPi? Spy++ and analog return GetWindowText only caption window "PropertyGrid". i need read data from other program im my program ...

How do I control the access of multiple threads to a collection of objects?

I'm writing an application that displays a list of objects which the user can select and then view and edit the properties of through a PropertyGrid control. The object's properties are populated by time consuming process of extracting information from files through the use of a secondary thread. But I'd also like to allow the user to co...

Property grid item and DoubleClick.

Hi, I'm using PropertyGrid control for editing some objects in my application. I'm using custom TypeConverters and TypeEditors for better user interface. I have problem with custom TypeConverter for boolean properties. If I have this class: public class MyClass { public string Name { get; set; } [System.ComponentModel.TypeCon...

Refresh property grid, at Design-time, when a readonly collection changes in .Net, Winforms

I have a class that has a readonly collection property - Its a list of extender providers that have been applied to the control. I've implemented a simple property descriptor for the collection so that the property can be expanded in the property grid to examine each entry. When I select an extender provider and set it to false, I remo...

Known Issue? PropertyGrid shows empty DropDownList on Windows Server 2008 Enterprise

Running the following 39 lines of a minimal Windows Forms PropertyGrid shows an unexpected behavior on a Windows Server 2008 Enterprise machine: using System; using System.Windows.Forms; namespace MinimalPropertyGrid { public sealed class SomeType { public Kind Kind { get; set; } } public enum Kind { ...

Get list of properties and values from PropertyGrid

I have access to a 3rd party PropertyGrid within my application (C#. ,Net v2). Is there an easy way to iterate over the properties in the grid and their values? ...

How to change the DisplayNameAttribute on runtime to use in a Property Grid C#

I am wondering how to change the DisplayNameAttribute on runtime, I want the displayName to be Feet instead of Meters in my property grid when I do some conversions, is that possible? [DisplayName("Meters")] public double Distance { get{return distance;} } ...

.Net Custom Configuration Section and Saving Changes within PropertyGrid

If I load the My.Settings object (app.config) into a PropertyGrid, I am able to edit the property inside the propertygrid and the change is automatically saved. PropertyGrid1.SelectedObject = My.Settings I want to do the same with a Custom Configuration Section. Following this code example (from here http://www.codeproject.com/KB/vb/...