Home Forums WinForms controls Xceed Grid for WinForms Autofit issue when detail grid not expanded

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16839 |

    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?

     Thanks,

    Bernie

    Imported from legacy forums. Posted by Bernard (had 1973 views)

    User (Old forums)
    Member
    Post count: 23064

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.