When I load data into the detail grids, I always go through a foreach with col.GetFittedWidth() (only on last one because if have SynchronizeDetailGrids = true). As long as one one of the detail grids is expanded, the ‘fitting’ works. If none of the detail grids is expanded then the ‘fitting’ doesn’t work (columns are too small). Is this expected behavior? If so do I need to trap the expand/colapse events and do a GetFittedWidth on expand?
Imported from legacy forums. Posted by Bernard (had 1973 views)
That’s the expected behavior. Because of virtualization, when detail grids are created collapsed, their DataRows are not created right away.
The solution is to either do it on the first detail grid expand (in the case the detail grids are synchronized), or to access each detail grid’s DataRows collection, which will actually create the DataRows, and the GetFittedWidth will then work.
Imported from legacy forums. Posted by André (had 1969 views)