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
405
Child band alignment
posted

I have a multiband wingrid where one band contains a 'rolled up' summary of the values in a child band, and the child band contains the more granular details.  Both bands have matching columns but the parent band has a few more columns that come before those that match in the child band.  What I am trying to do is move the child ban over so that the columns line up with each other.  In effect, I need to right justify the two bands with each other.  That way when a user looks at the screen the values for January (for instance) are in line with each other in both bands.  And the same for February, etc.  I tried setting the indentation property on the child band but that just causes the first column of the parent band to expand and therefore pushing everything else over.  I've attached a screenshot which hopefully will help you see my problem.

  

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    There's no way to just provide an indent to shift the columns over.

    What I would do is handle the InitializeLayout event of the grid and insert some unbound columns into the child band. Judging by the screen shot you have here, you would need 6 columns. You could set the Header.Caption on each of these columns to an empty string.

    Then you could handle the InitializeRow event and set the Hidden property on all 6 cells to true to there would be no cells in the row for those columns.