$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
PropertyGrid WinForms Control
Easily process properties of data objects, automatically generate and display custom data in C#.
Home > WinForms UI Controls > User Manual > Add Custom Property Grid in C#

Add Custom Properties in PropertyGrid

KetticPropertyGrid control for Windows Forms application allows the users easily process properties of data objects. This .NET component contains automatic generation and intuitive custom editors for the users to display and customize the data for their Windows Forms application. The users of the KetticPropertyGrid control can set and customize the property editors using C# code and perform the scrolling operations through touch interface. This article will demonstrate how to add custom properties by using the KetticPropertyStore.

Use the KetticPropertyStore in C#.NET

Before we are going to add custom properties, we shall start the KetticPropertyStore first as the steps below.
  • Create a new instance of the KetticPropertyStore in your Windows application.
  • Fill the instance newly created with the PropertyStoreItems in C#.NET project.
  • Modify the instance as ChosenObject of KetticPropertyGrid in Windows Forms.

Customize PropertyStoreItems in KetticPropertyGrid in C#.NET

After we applied the KetticPropertyStore, we can edit the PropertyStoreItems as requirements to create custom properties as below,
  • Edit the PropertyStoreItems values as an object by using the KetticPropertyGrid
  • Specify property value in the KetticPropertyStore, as is reflected in the KetticPropertyGrid instantly.
  • Add or remove items in KetticPropertyStore at runtime, as is reflected in KetticGridView.
The C# code below shows how to add, remove and edit the PropertyStoreItems.

store["Integer"].Value = 100;
store["Dock"].Value = DockStyle.Fill;
store.RemoveAt(store.Count - 1);
store.Add(typeof(bool), "Boolean", true);

Additionally, in order to store the value in the PropertyStoreItems, we need to provide a value of the same type as the PropertyStoreItem or a value that can be converted via the TypeConverter of the property type.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls