Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXWIN0003: Pattern View Access

In This Article

Severity: Warning

When you set up Master-Detail sources in Data Grid, you select a View that should display details. However, this View (“pattern View”) does not exist at runtime. Instead, Data Grid creates copies of this pattern View (“clone Views”) and uses these copies to display detail data.

Since pattern Views do not display any data at runtime, it is incorrect to access these Views in attempts to obtain and modify cell values. Instead, get a copy (clone) of a required View. If you are handling an event, a real clone View is stored in the sender property.

See this article for more information: Patterns and Clones.

#Invalid Code

C#
private void GridView_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e) {
   var value = this.gridView1.GetRowCellValue(e.RowHandle, e.Column);            
}

#Valid Code

C#
private void GridView_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e) {
   GridView view = sender as GridView;
   var value = view.GetRowCellValue(e.RowHandle, e.Column);  
}