You call the GetFittedWidth on the template, before it is filled with actual data, which explains the result you get. So the template is set to the header width, since this is the only thing that is present, and this is the width that is used when generating the actual DetailGrids from the template.
You need to do this once the DetailGrid is actually created and filled with data. In the code I provided before, you can see that a specific DetailGrid instance is taken from a specific row, and this works fine.
//get the DetailGrid
DetailGrid detail = row.DetailGrids[ 0 ];
Imported from legacy forums. Posted by André (had 5473 views)