Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Grouping
   [Expand]Sorting
   [Expand]Summaries
   [Expand]Data Editing
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Collapse]Examples
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Export and Printing
    [Expand]Filtering
    [Expand]Formatting
    [Expand]General Use
    [Expand]Layout View
    [Expand]Master-Detail
    [Expand]Miscellaneous
    [Expand]Navigation and Selection
    [Collapse]Painting
      Examples: Painting
      How to: Custom Draw Card Captions
      How to: Custom Draw Card Field Captions
      How to: Custom Draw Card Fields
      How to: Custom Draw Cells Depending Upon Cell Values
      How to: Custom Draw Footer Cells
      How to: Custom Draw Group Rows
      How to: Custom Paint Card Field Values Depending on Field Positions
      How to: Custom Paint Group Footers
      How to: Custom Paint Row Indicators
      How to: Custom Paint Sort Glyphs Within Column Headers
      How to: Display a Custom Image Within a Group Panel
      How to: Display Custom Images in Card Captions
      How to: Display Images Within Row Preview Sections
      How to: Display Some Text When No Record is Displayed in the Grid
      How to: Dynamically Customize Cell Appearance
      How to: Dynamically Customize the Appearance of Card Captions in a Layout View
      How to: Dynamically Customize the Appearance of Card Field Captions in a Layout View
      How to: Dynamically Customize the Appearance of Card Field Values in a Layout View
      How to: Paint the sort and filter buttons when custom painting
    [Expand]Skins and Look and Feel
    [Expand]Sorting and Grouping
    [Expand]Summaries
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [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]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Dynamically Customize the Appearance of Card Field Values in a Layout View

The following code shows how to dynamically customize the appearance of field values in a Layout View dependant on specific conditions.

In the example the LayoutView.CustomFieldValueStyle event is handled to customize the appearance of Description and CategoryName field values. Values of these fields are only painted in red in the cards that have the CategoryName field set to "Beverages".

The result is shown below:

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