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.
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.
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.
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.
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.
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.
| ![]() UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlGet Started in C#Property Grid - AttributeAdd Custom PropertiesBinding to Multiple ObjectsProperty Grid - CustomizationProperty Grid - LocalizationProperty Grid - EditorsC# API & EventsValidationCustomizing Editor BehaviorHandle EventsProperty Grid - FeaturesFeatures - filteringFeatures - GroupingCustom GroupingFeatures - SortingFeatures - Help BarFeatures - Tool BarWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |