[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]Get Started With Data Grid and Views
   [Expand]Data Binding
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
    [Expand]Conditional Formatting
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Export and Printing
    [Expand]General Use
    [Expand]Layout View
      Examples: Master-Detail Mode
      How to: Bind GridControl to a DataBase and Implement Master-Detail Mode at Runtime
      How to: Expand and Maximize a Specific Detail
      How to: Implement Card Dragging Between Details
      How to: Replace a View Used to Represent a Specific Master-Detail Relationship
      What Can Cause Properties, Methods, and Events of a Detail View to Fail?
    [Expand]Navigation and Selection
    [Expand]Skins and Look and Feel
    [Expand]Sorting and Grouping
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property 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]Sunburst 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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

What Can Cause Properties, Methods, and Events of a Detail View to Fail?

Expanded Issue Description

When using Grid Control in a master-detail mode, you may need to refer to rows within detail Views. However, if you refer to rows via detail pattern Views, you will get undesired results. For instance, reading the ColumnView.FocusedRowHandle property for a detail pattern View will always return the GridControl.InvalidRowHandle value (-999999).

Expanded Solution

A common mistake when performing data specific operations in a master-detail mode on detail views (deleting and obtaining records, collapsing/expanding groups and master rows, etc.) is using pattern views that are created at design time and used as sublevels of GridControl. Pattern views don't contain any data and they are never displayed on screen. Pattern views only serve as templates, i.e. they provide layout settings for representing data displayed by real detail views (clones). You can get detailed information on pattern and clone views in Master-Detail Relationships. There are several ways to access a real Grid View with which an end-user interacts at runtime:

After the required view is obtained, you can get the currently focused row via the view's ColumnView.FocusedRowHandle property or use any other property or method of the detail view.

Expanded See Also

Is this topic helpful?​​​​​​​