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]Data Binding
   [Expand]Views
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Filter and Search
   [Expand]Summaries
   [Expand]Focus and Selection Handling
    Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
    Scrolling
   [Expand]Batch Modifications
   [Expand]Hit Information
    Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Collapse]Examples
    [Expand]Conditional Formatting
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Export and Printing
    [Expand]Filtering
    [Expand]Formatting
    [Expand]General Use
    [Expand]Layout View
    [Collapse]Master-Detail
      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]Miscellaneous
    [Expand]Navigation and Selection
    [Expand]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]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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

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