Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
Synchronizing Column Widths on a Multi Band HeaderPlacement FixedOnTop UltraGrid
posted

I need to synchronize the Grid Columns but for some reason, the code I wrote to synch up the columns does not work where I resize the columns of the child bands to the size of the corresponding column in the first band. I checked the indentation and does not know how to get the indent values but even the last column (Total) is not the same width as the child band's Total columns. 

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

    It's hard to guess what's not working here without seeing the code. Just from the screen shot, I am guessing that you are using RowLayouts here with groups. So that must be why you are trying to synch up the columns widths in code instead of just using AllowColSizing. It looks like you also have OutlookGroupBy turned on. So I'm not sure it's even possible to align the columns in that case, since the column widths are defined on the band and the grouping means that rows within the same band will have different indentation - unless you turn this off by setting IndentationGroupByRow on the band to 0.

    If you do that, and it's just a question of getting the band's indentation, then you could get it like this:

    band.GetExtent(BandOrigin.PreRowArea) - band.GetExtent(BandOrigin.RowCellArea)

Reply Children
No Data