$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
PropertyGrid WinForms Control
Create elegant and functional user interfaces and display the editable properties of a given object
Home > WinForms UI Controls > User Manual > Get Started Property Grid Control in C#

PropertyGrid .NET Component Tutorial

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 are able to bind the control to a data item with a simple C# code snippet and set the properties as requirements. This control is capable of creating editor controls for properties automatically, for example, DateTimePickers for dates, text fields for string properties, ComboBoxes for enums and Booleans, KetticColorPicker for colors. Furthermore, the users of the KetticPropertyGrid control can set and customize the property editors using C# code and perform the scrolling operations through touch interface.

How to Use KetticPropertyGrid WinForms Control

In the tutorial below, we are going through the approach of using the KetticPropertyGrid control for Windows Forms. We shall add the control to the Windows Forms first, and then set the ChosenObject property to an object using C# code to display the public properties. In this case, we shall use the PropertyGridElement of the control. The C# code below shows how to set object to the ChosenObject property.

ketticPropertyGrid1.ChosenObject = new PropertyGridElement();
After the step above, a help section will appear and read the name and the content of the Description attribute of the property selected. And we can set the visibility by customize the HelpVisible property
And then, we can add a predefined toolbox on the top of the KetticPropertyGrid to sort and group items. This can be done by setting the Category attribute of the ChosenObject properties and enable the ToolBarVisible property like the C# code below.

ketticPropertyGrid1.ToolbarVisible = true;
In addition, we can add a button to clear the filter text box by adding additional elements to the toolbox of the StackLayoutPanel as the C# code below.

KetticButtonElement clearFiltering = new KetticButtonElement();
clearFiltering.Text = "Clear";
clearFiltering.MinSize = new System.Drawing.Size(25, 22);
clearFiltering.StretchHorizontally = false;
clearFiltering.Click += new EventHandler(clearFiltering_Click);

void clearFiltering_Click(object sender, EventArgs e)
{
ketticPropertyGrid1.PropertyGridElement.ToolbarElement.SearchTextBoxElement.Text = "";
}
KetticPropertyGrid control allows the users to edit through the property editor. To customize the editors, we can choose one of the predefined options of the StartEditMode property, such as StartEditOnClick, StartEditOnDoubleClick, and StartEditInCode. The C# code below shows how to choose the start editing mode.

ketticPropertyGrid1.StartEditMode = KetticPropertyGridStartEditModes.StartEditOnClick;
KetticPropertyGrid control allows the users to customize the sorting or grouping of the properties by setting the property, PropertySort, to one of the enumerated values, like, Alphabetical, Categorized, CategorizedAlphabetical, and None. The C# code below shows how to group by categories.

ketticPropertyGrid1.PropertySort = PropertySort.Categorized;
KetticPropertyGrid provides a SortOrder property to customize the sort order. We can set the SortOrder property to one of the values, including Ascending, Descending and None as the C# code below.

ketticPropertyGrid1.SortOrder = SortOrder.Ascending;
  • To set the expand and collapse image of the KetticPropertyGrid control, we can select one of the four properties, CollapseImage, ExpandImage, HoveredCollapseImage and HoveredExpandImage
  • The property, SelectedGridItem, is able to call the Select() method to set a specific item to the control.
  • KetticPropertyGrid allows the users to access the KetticContextMenu property to change the default context menu for their Windows application.
  • Additionaly, KetticPropertyGrid control offers several properties for the users to customize the display items, like, ItemHeight, ItemSpace, and ItemIndent.
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