Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Collapse]Vertical Grid
   [Expand]Visual Elements
   [Expand]Design-Time Features
     How to: Edit properties of multiple objects in a single PropertyGridControl
     How to: Filter an object's properties using the CustomPropertyDescriptors event
     How to: Format Values in the XtraVerticalGrid Using Standard Format Strings
     How to: Print a Vertical Grid and Show its Print Preview
     How to: Sort properties using the CustomPropertyDescriptors event
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Sort properties using the CustomPropertyDescriptors event

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2263.

This example shows how to display an object's properties in a PropertyGridControl in a custom order. Properties are sorted via the CustomPropertyDescriptors event.

By default, properties are sorted according to their display names. To display properties in a custom order, the properties are sorted, and then the sorted collection is assigned to the event's Properties parameter.

How would you rate this topic?​​​​​​​