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
   [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]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Export and Printing
    [Expand]General Use
    [Expand]Layout View
    [Expand]Navigation and Selection
      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]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

How to: Custom Paint Row Indicators

The example shows how you can customize cells in the row indicator panel via the GridView.CustomDrawRowIndicator event.

Instead of painting cells in the event, we change the text to display in the cell and leave the CustomDrawEventArgs.Handled parameter set to false. In this case, the cell will be painted based on settings of the RowIndicatorCustomDrawEventArgs.Info object after executing the event handler (the new display text will be drawn). The indicatorIcon variable controls whether standard glyphs should be drawn. If the property is false, the ImageIndex property is set to -1 in order to prevent displaying images.

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