Here is the screen when I have the value AutoSizeColumnsMode.AllCells set. I have it set in 2 locations. I set the sfDataGrid control to have AutoSizeColumnsMode.AllCells. And when the relation is autogenerated I set the value for the new datagrid in the AutoGeneratingRelations method
e.GridViewDefinition.DataGrid.AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells
Here is what the screen looks like when I change the AutoSizeColumnsMode to .Fill in the same two places. I made no other code changes.
The user now can not read the values in the first 4 columns. All this approach does is compress the columns to make them fit in the width that is available. While that does fix the problem where I could not see all of the columns, it creates another problem where the values are cut off. I know have to expand each cell to see what the value is. This will not work. What I need is to have the detail record width be longer than the master record so all of the columns can show in a normal width so the value can be read.
In my application the width of the Master row and the detail row will be variable based on the number of months that are being displayed. So I can not just make the control wider to make the .Fill approach work. If nothing else, I have to find a way to make the system make the Master row wider so there will be enough space to display the columns in the detail record. The better approach however, would be to allow the detail row display wider than the Master row and set the horizontal scroll so it will scroll to the widest row in the grid.