propertygrid

Looking for ASP.NET code to render a form that displays a view of an object

I've got the task of displaying a web form to represent the properties in a .NET class. In WinForms, there's a pre-fab control named PropertyGrid that is a lot like what I need. I'm just looking for something to display a simple layout of property names next to an appropriate control like a textbox for strings or a dropdownlist for enum ...

Property Grid Object failing on combo box selection but OK when combobox scrolled or double clicked

I have a Property Grid in C#, loading up a 'PropertyAdapter' object (a basic wrapper around one of my objects displaying relevant properties with the appropriate tags) I have a TypeConverter on one of the properties (DataType, that returns an enumeration of possible values) as I want to limit the values available to the property grid to...

How to find GridItem from click on PropertyGrid?

I'm trying to do some custom UI behavior on a Windows Forms PropertyGrid control. I'd like to be able to respond to clicks and double-clicks on the GridItems to change the state. For example, to flip a binary or ternary variable through its states. I can get at the underlying view by looking up a child of typename "PropertyGridView" and...

Multi-line string in a PropertyGrid

Is there a built-in editor for a multi-line string in a PropertyGrid. ...

Collection Editor at runtime

Hi, I'm working on an application to edit name/value pairs using a property grid. Some of the properties in my class file are ListDictionary collections. Is there an Editor attribute that I can apply at the property declaration that will make the Collection Editor work at runtime? If not, is it possible to inherit from ComponentMod...

How can I get an OpenFileDialog in a custom control's property grid?

Hi community, I'm creating a .net custom control and it should be able to load multiple text files. I have a public property named ListFiles with those properties set : [Browsable(true), Category("Configuration"), Description("List of Files to Load")] public string ListFiles { get { return m_oList; } set { m_oList = value;...

Property Grid on Composite objects

When I bind this object public class MyObject { public AgeWrapper Age { get; set; } } public class AgeWrapper { public int Age { get; set; } } to a property grid, what is shown in the value section of the property grid is the class name of AgeWrapper, but the value for AgeWrapper.Age. Is there anyway to make it so that in the pro...

How to prevent scroll on Refresh in a PropertyGrid?

I'm using a PropertyGrid in a tool app to show a window to monitor an object in a remote app. Every second or so I get an update from the app with the state of any members that have changed, and I update the grid. I call Refresh() to make the changes take. This all works pretty well except one thing. Say the object is too tall to fit in...

Is there a better StringCollection editor for use in PropertyGrids?

I'm making heavy use of PropertySheets in my application framework's configuration editor. I like them a lot because it's pretty easy to work with them (once you learn how) and make the editing bulletproof. One of the things that I'm storing in my configuration are Python scripts. It's possible to edit a Python script in a StringColle...

How to modify PropertyGrid at runtime (add/remove property and dynamic types/enums)

How do you modify a propertygrid at runtime in every way? I want to be able to add and remove properties and add "dynamic types", what I mean with that is a type that result in a runtime generated dropdown in the propertygrid using a TypeConverter. I have actually been able to do both those things (add/remove properties and add dynamic ...

How can I force the PropertyGrid to show a custom dialog for a specific property?

I have a class with a string property, having both a getter and a setter, that is often so long that the PropertyGrid truncates the string value. How can I force the PropertyGrid to show an ellipsis and then launch a dialog that contains a multiline textbox for easy editing of the property? I know I probably have to set some kind of attr...

Events in UserControl

Hi all, I am new to UserControls, and while developing my own control I found a problem with showing events of my control in the property grid at design time. If I have some events in my control I want to see them in Property grid and if I double-click that I want to have a handler, in the same way Microsoft does for its controls. ...

Read-only PropertyGrid

Hi, I need to show an object in PropertyGrid with the following requirements: the object and its sub object must be read-only, able to activate PropertyGrid's CollectionEditors. I found a sample that's closely match to what I need but there's an unexpected behaviour I couldn't figure out. I have more than one PropertyGrids each for dif...

Is it possible to mark a property shown in a property grid as a password field

I'm using C# and have a windows form containing a property grid control. I have assigned the SelectedObject of the propertygrid to a settings file, which displays and lets me edit the settings. However one of the settings is a password - and I'd like it to display asterisks in the field rather than the plain text value of the password ...

PropertyGrid - TypeConverters for database name/value pairs

I'm using a PropertyGrid to display information about various classes(at Runtime). The information comes from a database and thus has several look-ups that are represented by numbers (1=Red, 15=Green etc). One of the columns is in milliseconds and I would like to present the user with option of selecting the unit (1 hour=3600000, 1 day...

Using the .NET collection editor without using a property grid control

I have a PropertyGrid on my form. My boss thinks it's ugly. Uncouth. Unsophisticated. He wants a nice, neat, clean form. Here's the catch: One of the properties is a collection of our home-grown objects. He likes the collection editor for this collection. I know I can build my own collection editor. But is there a clean, simple solutio...

PropertyGrid - Ilist Collection Remove not firing as expected

I have a collection object that implements IList. Inside the collection I have used a List to collect the items. Inside the PropertyGrid (at runtime), it binds properly and the Collection Editor opens. I can edit, and I can add items properly and I can catch these methods when they are used in the collection class. However, if you try t...

Setting the SelectedTab on a PropertyGrid

Does anybody know how to programmatically set the selected PropertyTab on a PropertyGrid in the .Net framework? The SelectedTab property is not settable, which is understandable, since the documentation indicates you should not be creating instances of PropertyTabs yourself. However, I cannot seem to find a corresponding method to cal...

How can I get an overridden Text property of my user control to show up in the form designer in VS2005?

I have a user control with the following code in it. [System.ComponentModel.Category("Appearance")] public override string Text { ... } private int myVar; [System.ComponentModel.Category("Appearance")] public int MyProperty { ... } MyProperty shows up in the property grid when the control is inserted in a form, but Text does not. Ho...

Applying MaskedTextBox control behavior to a property item field in PropertyGrid

Hi all, I am working on C# and .NET. As we know that, the best way to stop users from entering invalid data into an input control is Masked TextBox by which we can assign a predefined mask such as Short DateTime mask(--/--/----) I have a PropertyGrid and assigned it to an instance of a class which is having properties of DateTime type...