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
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Grid View
   [Expand]View Technology
   [Expand]Data Editing
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Collapse]Formatting Cell Values
     Data Grid Formatting Specifics
     Member Table: Formatting
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [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]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Data Grid Formatting Specifics

Expanded Standard Formatting Mechanism

In a GridControl, cell display values can be formatted using the standard formatting mechanism described in MSDN. It allows you to format values using standard or custom format patterns or implement custom formatting by creating a custom formatter object. To format cell values using this approach, use a column's GridColumn.DisplayFormat property.

It is possible to assign an in-place editor to a grid column or individual cell, and then use the editor's RepositoryItem.DisplayFormat property to specify the formatting settings that will be used in display mode. This approach is similar to using the GridColumn.DisplayFormat property. However, it is possible to supply different editors for different rows, and thus allow you to provide different formatting for different cells.

See Formatting Values for information on adjusting the DisplayFormat properties.

Expanded Formatting via Events

The ColumnView.CustomColumnDisplayText event can be handled to provide custom display text for specific cells. Note that this event cannot be used to supply display values based on other cells' values. See the ColumnView.CustomColumnDisplayText topic to learn more.

If you need to provide display values based on other cells' values, use an unbound column to provide display data.

Expanded See Also

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