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
555
Cell Spanning in WinGrid
posted

Hi ,

i need on help on as how to do cell spaning in WinGrid ..

My requirement is ,there are 3 columns in the grid. In some cases ,

i want to merge three cells in a row as if it look like one cell in a row ..

Can someone plz help me to resolve this issue.

Thanks.

 

.

 

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    Do you want to do this for every row? Or just on some rows?

    If you want to do this for every row, then the easiest thing to do would be to hide all three of the bound columns and add an unbound column to your grid. Then you would use the grid's InitializeRow event to populate the unbound cell based on the values in the bound cells.

    If you want to do this on a row-by-row basis, it's a lot more complicated. You would still need the unbound columns. But you would need to use a RowLayout and set it up in such a way that the unbound column occupies the same logical location and span as the three bound columns. Then what you would do is use InitializeRow to set the Hidden property on each cell so that either the 3 bounds cells or the unbound cell are visible.