Posted 8 June 2021, 12:35 am EST
Hi Sanjeeb,
You can use the method demonstrated in the product sample “CustomMerge4” located at C:\Users\username\Documents\ComponentOne Samples\WinForms\v4.5.2\FlexGrid\CS.
You can extend the C1Flexgrid and then you can override both GetMergedRange and GetData, and have GetData provide your custom data while the grid is calculating the
merged ranges.
To set the text alignment to be vertically on top, you can either set the TextAlign property of the column or you will have to set the text-align of the cells of the range.
Please refer to the sample attached and modify it according to your requirements.
Regards.
Avnish
PS:
Thank You Wolfgang for the help. Yes, merged ranges can also be manually added by going through the rows and checking for the required criteria.
CustomMerge4_mod.zip