Home Forums WinForms controls Xceed Grid for WinForms Master/Detail Issue Reply To: Master/Detail Issue

Xceed Support
Post count: 5658

You can set AutoCreateColumns property (of the master grid) to false even if you have a detail grid. However, you need to add (to the master grid) a DataBoundColumn representing the “Relation” between the master and the detail grid.

gridControl1.AutoCreateColumns = false;

DataBoundColumn column1 = new DataBoundColumn( “PK” );
DataBoundColumn column2 = new DataBoundColumn( “Relation1” );

gridControl1.Columns.Add( column1 );
gridControl1.Columns.Add( column2 );

Imported from legacy forums. Posted by CharlesB (had 497 views)