For the first problem, you are probably using the detail grid template instead of the detail grid instance of the master row where you want to add a new row. You can access the specific instance when the form is first loaded through the InitializingDetailGrid event, or thought the DetailGrids collection on the DataRow.
Xceed.Grid.DataRow detailRow = gridControl1.DataRows.DetailGrids.DataRows.AddNew();
As for the second problem, this is because there is probably no column in the collection when it is empty, so the grid cannot generate the corresponding columns. Either you make sure you always have something in the collection, or you can set the SynchronizeDetailGrids property on the GridControl to false.
Imported from legacy forums. Posted by André (had 568 views)