How to stop merging on certain rows in a column

Posted by: MichaelT on 11 March 2019, 1:56 pm EST

  • Posted 11 March 2019, 1:56 pm EST - Updated 3 October 2022, 8:09 pm EST

    Hi,

    1. I have a 9x9 grid.

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    x x x x x x x x x

    1. I want to merge each set of three rows but only for the first three columns.

              x   x   x   x   x   x 
      

    x x x x x x x x x (set 1)

    x x x x x x

    x x x x x x

    x x x x x x x x x (set 2)

    x x x x x x

    x x x x x x

    x x x x x x x x x (set 3)

    x x x x x x

    1. If the last two of the merged rows are blank (no data such as a 0) then I still want the borders on the cells instead of them auto merging together.

               x   x   x   x   x   x 
    

    x x x x x x x x x (set 1)

    x x x x x x

               x   x   x   x   x   x 
               x   x   x   x   x   x        (set 2)
               x   x   x   x   x   x 
    

               x   x   x   x   x   x 
               x   x   x   x   x   x        (set 3)
               x   x   x   x   x   x 
    

    However, what I see right now is:


               x   x   x   x   x   x 
    

    x x x x x x x x x (set 1)

    x x x x x x

               x   x   x   x   x   x 
               x   x   x   x   x   x        (set 2)
               x   x   x   x   x   x 
               x   x   x   x   x   x 
               x   x   x   x   x   x        (set 3)
               x   x   x   x   x   x 
    

    ----------------------------------

  • Posted 11 March 2019, 1:58 pm EST

    My grid got messed up when submitting. All the left space padding was removed from my "X"s. Can I edit the post?

  • Posted 12 March 2019, 12:09 am EST

    Hi,

    As the default merging behaviour, FlexGrid merges cells either rows or columns if the content of the cells is the same. If you would like to modify this behaviour then you need to implement a custom MergeManager class that inherits from the base MergeManager and assign it to the flexgrid.mergeManager property.

    Please refer to the following sample to get started with the custom merge manager and let us know if you face any issues: https://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/CustomMerging

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels